Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKMZw-00041T-Dr for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Jul 2016 09:23:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bKMZv-0004Vo-6J for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Jul 2016 09:23:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bKMYY-0002zw-MX for pgsql-hackers@postgresql.org; Tue, 05 Jul 2016 09:22:14 +0000 Received: from palladium.wars-nicht.de ([89.238.64.91] helo=polonium.wars-nicht.de) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bKMYW-0008Ht-8O for pgsql-hackers@postgresql.org; Tue, 05 Jul 2016 09:22:13 +0000 Received: from localhost (localhost [127.0.0.1]) by polonium.wars-nicht.de (Postfix) with ESMTP id 6D2BA114039; Tue, 5 Jul 2016 11:22:10 +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 MLUGTRGRmX7X; Tue, 5 Jul 2016 11:22:09 +0200 (CEST) Received: from diamond.wars-nicht.de (unknown [212.86.58.192]) by polonium.wars-nicht.de (Postfix) with ESMTPSA id 8327B114037; Tue, 5 Jul 2016 11:22:09 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by diamond.wars-nicht.de (Postfix) with ESMTP id E7CBC1BE323E; Tue, 5 Jul 2016 11:22:08 +0200 (CEST) Subject: Re: to_date_valid() To: "David G. Johnston" References: <57786490.9010201@wars-nicht.de> <577A8DC8.2040505@wars-nicht.de> <577B01A9.8080102@wars-nicht.de> Cc: Pavel Stehule , Craig Ringer , Euler Taveira , PostgreSQL mailing lists From: Andreas 'ads' Scherbaum Message-ID: <577B7C40.2030407@wars-nicht.de> Date: Tue, 5 Jul 2016 11:22:08 +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 05.07.2016 04:33, David G. Johnston wrote: > On Mon, Jul 4, 2016 at 8:39 PM, Andreas 'ads' Scherbaum > >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 offe= r? > > > =E2=80=8BWe don't have to change the name...we could do something like how > RegularExpressions work - like (?i) - and just add a new modifier =E2=80= =8Bcode. > > =E2=80=8B'~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=20 "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=20 it. This would be a huge break, plus an API change - something you don't=20 add in a Beta. --=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