From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "Andreas 'ads' Scherbaum" <adsmail(at)wars-nicht(dot)de> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: to_date_valid() |
Date: | 2016-07-05 11:41:15 |
Message-ID: | CAKFQuwYeVx2LoU+Hb=DdQ3_A03CbFJahV=UmBzkQieCWso=N3w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jul 5, 2016 at 5:22 AM, Andreas 'ads' Scherbaum <
adsmail(at)wars-nicht(dot)de> wrote:
> On 05.07.2016 04:33, David G. Johnston wrote:
>
>> On Mon, Jul 4, 2016 at 8:39 PM, Andreas 'ads' Scherbaum
>> <adsmail(at)wars-nicht(dot)de <mailto:adsmail(at)wars-nicht(dot)de>>wrote:
>>
>> On 04.07.2016 18:37, Pavel Stehule wrote:
>>
>>
>> I don't know if the name "strict" is best, but the name
>> "validate" is
>> not good too. Current to_date does some validations too.
>>
>>
>> Obviously not enough, because it allows invalid dates. I'd say that
>> the current to_date() merely validates the input format for string
>> parsing, and that the date is in range. But there is not much
>> validation on the date itself.
>>
>> So the name can't be "strict" because of the conflict with "NULL"
>> handling, and you don't like "valid" - what other options do you
>> offer?
>>
>>
>> We don't have to change the name...we could do something like how
>> RegularExpressions work - like (?i) - and just add a new modifier code.
>>
>> '~YYYY-MI-DD' --that's a leading tilde, could be anything - even
>> something like "HMYYYY-MI-DD" for "historical mode"
>>
>
> Where to_timestamp() already uses HH for the hour? If you add another "H",
> that surely is confusing.
I don't really try to pick final names for things until the idea has taken
hold...
>
>
>
> It seems that fixing it is back on the table, possibly even for 9.6
>> since this is such a hideous bug - one that closely resembles a cockroach
>> ;)
>>
>
> 9.6 is already in Beta, people are testing their applications against it.
> This would be a huge break, plus an API change - something you don't add in
> a Beta.
>
>
Surely these beta testers would test against the RC before putting it into
production so I don't see an issue. I tend to agree generally but the
point of beta is to find bugs and solicit suggestions for improvement to
features. Having found a bug it doesn't make sense to avoid patching our
current unstable release. This applies moreso because of our annual
release cycle. On the topic of whether this becomes an exception to the
rule I'm largely ambivalent.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Krzysztof Kaczkowski | 2016-07-05 11:46:01 | Re: Cluster on NAS and data center. |
Previous Message | Andreas 'ads' Scherbaum | 2016-07-05 09:22:08 | Re: to_date_valid() |