Junk date getting uploaded into date field

Поиск
Список
Период
Сортировка
От bsreejithin
Тема Junk date getting uploaded into date field
Дата
Msg-id 1383642240942-5776969.post@n5.nabble.com
обсуждение исходный текст
Ответы Re: Junk date getting uploaded into date field  (John R Pierce <pierce@hogranch.com>)
Re: Junk date getting uploaded into date field  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
We have a csv file which we upload into postgres DB. If there are some
errors, like a data mismatch with the database table columns, postgres
should raise and error and upload should fail.

What is happening now is that, in case we get some junk date in the upload
file, postgres does auto-correction and does not raise an error!

A wrong date like ,say, 33-Oct-2013 gets converted as 2-Nov-2013 when the
data is loaded into a date field. No error raised.Data gets uploaded!

How can I prevent this ? I don't want this junk data to get loaded.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Junk-date-getting-uploaded-into-date-field-tp5776969.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: Jayadevan
Дата:
Сообщение: Re: Explanantion on pgbouncer please
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Junk date getting uploaded into date field