pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: Euler Taveira <euler@timbira.com.br>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: to_date_valid()
Date: Tue, 5 Jul 2016 11:22:08 +0200
Message-ID: <577B7C40.2030407@wars-nicht.de> (raw)
In-Reply-To: <CAKFQuwY0qYwP0+-dCsedzCsyhC_LjDLJ+hsWQvGkbG51RT9wrQ@mail.gmail.com>
References: <57786490.9010201@wars-nicht.de>
	<dcdebc73-ffdd-13a3-d6cd-73e1944a066b@timbira.com.br>
	<CAMsr+YHkfZ3KtRwrX+cYOLMXgUzFLTyfNnuNMB7KjOLhi6Mrig@mail.gmail.com>
	<CAFj8pRDR7cX7C-vc=_6WWmRau1gd8ZEk3S06Zq6XP7BZt+8c+w@mail.gmail.com>
	<CAFj8pRD25suv626vN6K0Kz=2W=TBJwoi07DhiWWU5gZZ6KPXhg@mail.gmail.com>
	<577A8DC8.2040505@wars-nicht.de>
	<CAFj8pRChHJgZUzcoe6avYf=7yuOgX=rPqDOdahUGaugdhkSrMw@mail.gmail.com>
	<577B01A9.8080102@wars-nicht.de>
	<CAKFQuwY0qYwP0+-dCsedzCsyhC_LjDLJ+hsWQvGkbG51RT9wrQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 05.07.2016 04:33, David G. Johnston wrote:
> On Mon, Jul 4, 2016 at 8:39 PM, Andreas 'ads' Scherbaum
> <adsmail@wars-nicht.de <mailto:adsmail@wars-nicht.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.


> 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.

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



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (37+ messages)  latest in thread

Message-ID: <577B7C40.2030407@wars-nicht.de>
Permalink:  ../577B7C40.2030407@wars-nicht.de/
Also on:    postgresql.org/message-id/577B7C40.2030407@wars-nicht.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: adsmail@wars-nicht.de, david.g.johnston@gmail.com, pavel.stehule@gmail.com, craig@2ndquadrant.com, euler@timbira.com.br
  Subject: Re: to_date_valid()
  In-Reply-To: <577B7C40.2030407@wars-nicht.de>
  References: <57786490.9010201@wars-nicht.de> <dcdebc73-ffdd-13a3-d6cd-73e1944a066b@timbira.com.br> <CAMsr+YHkfZ3KtRwrX+cYOLMXgUzFLTyfNnuNMB7KjOLhi6Mrig@mail.gmail.com> <CAFj8pRDR7cX7C-vc=_6WWmRau1gd8ZEk3S06Zq6XP7BZt+8c+w@mail.gmail.com> <CAFj8pRD25suv626vN6K0Kz=2W=TBJwoi07DhiWWU5gZZ6KPXhg@mail.gmail.com> <577A8DC8.2040505@wars-nicht.de> <CAFj8pRChHJgZUzcoe6avYf=7yuOgX=rPqDOdahUGaugdhkSrMw@mail.gmail.com> <577B01A9.8080102@wars-nicht.de> <CAKFQuwY0qYwP0+-dCsedzCsyhC_LjDLJ+hsWQvGkbG51RT9wrQ@mail.gmail.com> <577B7C40.2030407@wars-nicht.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox