Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJemR-0004VX-ED for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Jul 2016 10:37:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bJemQ-0003ch-EC for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Jul 2016 10:37:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bJel3-000275-FR for pgsql-hackers@postgresql.org; Sun, 03 Jul 2016 10:36:13 +0000 Received: from palladium.wars-nicht.de ([89.238.64.91] helo=polonium.wars-nicht.de) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bJeky-0002Xs-8P for pgsql-hackers@postgresql.org; Sun, 03 Jul 2016 10:36:11 +0000 Received: from localhost (localhost [127.0.0.1]) by polonium.wars-nicht.de (Postfix) with ESMTP id 94A10114037; Sun, 3 Jul 2016 12:36:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at polonium X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from polonium.wars-nicht.de ([127.0.0.1]) by localhost (polonium.wars-nicht.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qI62zyNIg9KJ; Sun, 3 Jul 2016 12:36:05 +0200 (CEST) Received: from diamond.wars-nicht.de (unknown [212.86.45.44]) by polonium.wars-nicht.de (Postfix) with ESMTPSA id 9D81C114035; Sun, 3 Jul 2016 12:36:05 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by diamond.wars-nicht.de (Postfix) with ESMTP id E83EE1BE1885; Sun, 3 Jul 2016 12:36:04 +0200 (CEST) Subject: Re: to_date_valid() To: Jaime Casanova , Euler Taveira References: <57786490.9010201@wars-nicht.de> Cc: Pg Hackers From: Andreas 'ads' Scherbaum Message-ID: <5778EA94.1020706@wars-nicht.de> Date: Sun, 3 Jul 2016 12:36:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 03.07.2016 07:05, Jaime Casanova wrote: > El 2/7/2016 20:33, "Euler Taveira" > escribi=C3=B3: > > > > 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 =3D 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.org https://www.postgresql.org/message-id/A737B7A37273E048B164557ADEF4A58B17C91= 40E%40ntex2010i.host.magwien.gv.at Hence the new function, which does not collide with the existing=20 implementation. Regards, --=20 Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers