Re: to_date_valid()

From: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: to_date_valid()
Date: 2016-07-05 00:39:05
Message-ID: 577B01A9.8080102@wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2016-07-05 02:33:15 Re: to_date_valid()
Previous Message Andreas Karlsson 2016-07-04 21:46:53 Re: to_date_valid()