timestamp bogus parser?

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: timestamp bogus parser?
Date: 2020-12-24 00:06:37
Message-ID: alpine.DEB.2.22.394.2012231928011.1129962@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello,

I tried:

psql> SELECT TIMESTAMP '2020-12-23Z19:28:45';

The result of which is:

2020-12-23 00:00:00

This is disappointing. Ok, my fault, I should have written TIMESTAMPTZ, or
use T instead of Z, or whatever.

Anyway, is there a rational for this behavior? I would have expected
either the time to be taken into account or an error message, but
certainly not half of my string being silently ignored. Skimming through
the doc (Section 8.5.1.3) did not provide an answer.

Any clues? Is this a bug?

--
Fabien.

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-12-24 00:14:18 Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Previous Message Thomas Munro 2020-12-23 23:03:52 Re: Re: Cache relation sizes?