Re: Bug in to_timestamp().

Joshua D. Drake <jd@commandprompt.com>

From: "Joshua D. Drake" <jd@commandprompt.com>
To: Steve Crawford <scrawford@pinpointresearch.com>, Alex Ignatov <a.ignatov@postgrespro.ru>
Cc: Albe Laurenz <laurenz.albe@wien.gv.at>, Tom Lane *EXTERN* <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, amul sul <sul_amul@yahoo.co.in>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-06-24T17:15:30Z
Lists: pgsql-hackers
On 06/24/2016 09:26 AM, Steve Crawford wrote:
> My observation has been that the PostgreSQL development group aims for
> correctness and the elimination of surprising results. This was part of
> the reason to eliminate a number of automatic casts to dates in earlier
> versions.
>
> To me, 2016-02-30 is an invalid date that should generate an error.
> Automatically and silently changing it to be 2016-03-01 strikes me as a
> behavior I'd expect from a certain other open-source database, not
> PostgreSQL.

I don't think anybody could argue with that in good faith.

Sincerely,

JD

-- 
Command Prompt, Inc.                  http://the.postgres.company/
                         +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.


Commits

  1. Improve behavior of to_timestamp()/to_date() functions

  2. Implement TZH and TZM timestamp format patterns

  3. as attache of this mail is patch (to the main tree) with to_char's