From: Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
To: Jaime Casanova <jaime.casanova@2ndquadrant.com>
To: Euler Taveira <euler@timbira.com.br>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: to_date_valid()
Date: Sun, 3 Jul 2016 12:36:04 +0200
Message-ID: <5778EA94.1020706@wars-nicht.de> (raw)
In-Reply-To: <CAJGNTeO75ZPm3qDk9rze7coGyvCZyWm68iEFY3WOYb5w=7OdBg@mail.gmail.com>
References: <57786490.9010201@wars-nicht.de>
<dcdebc73-ffdd-13a3-d6cd-73e1944a066b@timbira.com.br>
<CAJGNTeO75ZPm3qDk9rze7coGyvCZyWm68iEFY3WOYb5w=7OdBg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 03.07.2016 07:05, Jaime Casanova wrote:
> El 2/7/2016 20:33, "Euler Taveira" <euler@timbira.com.br
> <mailto:euler@timbira.com.br>> escribió:
> >
> > On 02-07-2016 22:04, Andreas 'ads' Scherbaum wrote:
> > > The attached patch adds a new function "to_date_valid()" which will
> > > validate the date and return an error if the input and output date do
> > > not match. Tests included, documentation update as well.
> > >
> > Why don't you add a third parameter (say, validate = true | false)
> > instead of creating another function? The new parameter could default to
> > false to not break compatibility.
> >
>
> Shouldn't we fix this instead? Sounds like a bug to me. We don't usually
> want to be bug compatible so it doesn't matter if we break something.
There are previous discussions about such a change, and this was rejected:
https://www.postgresql.org/message-id/lbjf1v%24a2v%241%40ger.gmane.orghttps://www.postgresql.org/message-id/A737B7A37273E048B164557ADEF4A58B17C9140E%40ntex2010i.host.magw...
Hence the new function, which does not collide with the existing
implementation.
Regards,
--
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
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, jaime.casanova@2ndquadrant.com, euler@timbira.com.br
Subject: Re: to_date_valid()
In-Reply-To: <5778EA94.1020706@wars-nicht.de>
References: <57786490.9010201@wars-nicht.de> <dcdebc73-ffdd-13a3-d6cd-73e1944a066b@timbira.com.br> <CAJGNTeO75ZPm3qDk9rze7coGyvCZyWm68iEFY3WOYb5w=7OdBg@mail.gmail.com> <5778EA94.1020706@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