Re: [HACKERS] Inconsistencies in from_char_parse_int_len() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Inconsistencies in from_char_parse_int_len()
Date
Msg-id 18481.1501534673@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Inconsistencies in from_char_parse_int_len()  (Douglas Doole <dougdoole@gmail.com>)
List pgsql-hackers
Douglas Doole <dougdoole@gmail.com> writes:
> I was playing with TO_TIMESTAMP() and I noticed a weird result:
> postgres=# select to_timestamp('20170-07-24 21:59:57.12345678', 'yyyy-mm-dd
> hh24:mi:ss.us');
>           to_timestamp
> --------------------------------
>  20170-07-24 22:00:09.345678+00
> (1 row)

FWIW, we already tightened that up in v10:

regression=#  select to_timestamp('20170-07-24 21:59:57.12345678', 'yyyy-mm-dd hh24:mi:ss.us');
ERROR:  date/time field value out of range: "20170-07-24 21:59:57.12345678"

There may well be some discrepancies left.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] POC: Sharing record typmods between backends