Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKEPr-0008IW-54 for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Jul 2016 00:40:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bKEPo-0004yU-Vj for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Jul 2016 00:40:41 +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 1bKEOS-0003Pa-1R for pgsql-hackers@postgresql.org; Tue, 05 Jul 2016 00:39:16 +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 1bKEOK-0001f7-M3 for pgsql-hackers@postgresql.org; Tue, 05 Jul 2016 00:39:15 +0000 Received: from localhost (localhost [127.0.0.1]) by polonium.wars-nicht.de (Postfix) with ESMTP id 7B231114037; Tue, 5 Jul 2016 02:39:07 +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 L2KgZE6o4nxE; Tue, 5 Jul 2016 02:39:05 +0200 (CEST) Received: from diamond.wars-nicht.de (unknown [212.86.41.102]) by polonium.wars-nicht.de (Postfix) with ESMTPSA id B1CA1114036; Tue, 5 Jul 2016 02:39:05 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by diamond.wars-nicht.de (Postfix) with ESMTP id 2E2ED1BE176D; Tue, 5 Jul 2016 02:39:05 +0200 (CEST) Subject: Re: to_date_valid() To: Pavel Stehule References: <57786490.9010201@wars-nicht.de> <577A8DC8.2040505@wars-nicht.de> Cc: Craig Ringer , Euler Taveira , PostgreSQL mailing lists From: Andreas 'ads' Scherbaum Message-ID: <577B01A9.8080102@wars-nicht.de> Date: Tue, 5 Jul 2016 02:39:05 +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: 7bit 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 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? -- 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