Re: BUG #2482: Wrong result in timestamp_in, timestamptz_in, date_in

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alexander Galler" <galler(at)kuzbass(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2482: Wrong result in timestamp_in, timestamptz_in, date_in
Date: 2006-06-16 04:05:10
Message-ID: 13035.1150430710@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Alexander Galler" <galler(at)kuzbass(dot)net> writes:
> select '20.01.01 BC'::timestamp;
> Result:
> "2020-01-01 00:00:00 BC"
> I want "20-01-01 00:00:00 BC"

You can write
select '0020.01.01 BC'::timestamp;

I agree it seems like a bug that the 'yy'->'20yy' conversion is applied
to BC dates. The code appears to try to avoid that, but I think it's
confused in this case because 'BC' hasn't been scanned yet.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Fuhr 2006-06-16 05:36:08 Re: BUG #2481: select from table's join with geometries doesn't go
Previous Message Tom Lane 2006-06-16 03:48:37 Re: BUG #2481: select from table's join with geometries doesn't go