Re: Documentation 9.8. Data Type Formatting Functions: missing behaviour on invalid input at to_date()

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: ehansmair(at)prompt-software(dot)de, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Documentation 9.8. Data Type Formatting Functions: missing behaviour on invalid input at to_date()
Date: 2020-06-12 21:28:19
Message-ID: 20200612212819.GA6813@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Fri, Jun 5, 2020 at 11:16:59AM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/12/functions-formatting.html
> Description:
>
> For the formatting functions, which convert between a string and a type like
> date, timestamp or number, there should be a description about the behaviour
> of i.e. to_date(input, mask) in case of invalid, not convertable input.
>
> I expected a return value of NULL and got a execution error.

Well, the value isn't "unknown", it is invalid, so an error seems
appropriate. I don't remember anyone complaining the expected a NULL
return.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2020-06-12 21:29:51 Re: create database with template doesn't copy ACL
Previous Message Fontana Daniel C (Desartec S.R.L.) 2020-06-12 14:11:52 Replication Binary in PostgreSQL 12