Re: Junk date getting uploaded into date field

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Junk date getting uploaded into date field
Дата
Msg-id 16999.1383663836@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Junk date getting uploaded into date field  (bsreejithin <bsreejithin@gmail.com>)
Список pgsql-general
bsreejithin <bsreejithin@gmail.com> writes:
> I am not sure why : select to_date('33-OCT-2013', 'dd-mon-yyyy')
> is returning 2013-11-02.
> For cases like the issue I am facing, where we need to raise an error saying
> the data is wrong, DB manipulating the data is not proper.

Then don't use to_date().  Just entering the string through the normal date
type input function will do what you want.  to_date() is meant for trying
to extract data from weird input formats.

            regards, tom lane


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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: WITH RECURSIVE doesn't work properly for me
Следующее
От: Jing Fan
Дата:
Сообщение: Re: WITH RECURSIVE doesn't work properly for me