Re: to_date_valid()

From: Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
To: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, 'Andreas Karlsson *EXTERN*' <andreas(at)proxel(dot)se>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: to_date_valid()
Date: 2016-08-15 08:24:07
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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

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

Artur Zakirov
Postgres Professional:
Russian Postgres Company

Attachment Content-Type Size
to-date-valid.patch text/x-patch 2.8 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Borodin 2016-08-15 08:39:30 Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)
Previous Message Mark Kirkwood 2016-08-15 07:04:01 Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)