Re: to_date_valid() - Mailing list pgsql-hackers

From Artur Zakirov
Subject Re: to_date_valid()
Date
Msg-id 95738e12-6ed6-daf5-9dcf-6336072e6b15@postgrespro.ru
Whole thread Raw
In response to Re: to_date_valid()  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
Responses Re: to_date_valid()  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
List pgsql-hackers
On 14.08.2016 01:52, Andreas 'ads' Scherbaum wrote:
>
> Attached is a patch to "do the right thing". The verification is in
> "to_date()" now, the extra function is removed. Regression tests are
> updated - two or three of them returned a wrong date before, and still
> passed. They fail now. Documentation is also updated.
>
>
> Regards,
>

Is it right and "true" way to validate date by extra transforming and
comparison?

Maybe validate date by using ValidateDate(). Attached sample patch.

--
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

Attachment

pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)
Next
From: Andrew Borodin
Date:
Subject: Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)