Re: to_date_valid()

From: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
To: "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-13 22:52:44
Message-ID: e9617e30-1b47-54ec-b978-2c84c6420b12@wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27.07.2016 05:00, Joshua D. Drake wrote:
> On 07/26/2016 06:25 PM, Peter Eisentraut wrote:
>> On 7/5/16 4:24 AM, Albe Laurenz wrote:
>>> But notwithstanding your feeling that you would like your application
>>> to break if it makes use of this behaviour, it is a change that might
>>> make some people pretty unhappy - nobody can tell how many.
>>
>> What is the use of the existing behavior? You get back an arbitrary
>> implementation dependent value. We don't even guarantee what the value
>> will be. If we changed it to return a different implementation
>> dependent value, would users get upset?
>
> No they would not get upset because they wouldn't know.
>
> Can we just do the right thing?

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,

--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project

Attachment Content-Type Size
to_date_valid.patch.gz application/gzip 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2016-08-13 23:18:06 WIP: Barriers
Previous Message Tom Lane 2016-08-13 22:50:55 Reminder: upcoming 9.6 branch split and rc1 release