Re: to_timestamp() changes in 8.4 release notes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: to_timestamp() changes in 8.4 release notes
Date: 2009-04-19 15:06:50
Message-ID: 13188.1240153610@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brendan Jurd <direvus(at)gmail(dot)com> writes:
> I noticed the following item under "Observe the following
> incompatibilities" in the 8.4 release notes (E.1.2.4.1.)

> * Require to_timestamp() input to match meridian (AM/PM) and era
> (BC/AD) format designations with respect to presence of periods
> (Brendan Jurd)

> For example, input value AD now does not match format string A.D..

> This is actually not a change in behaviour.

Well, it does seem to have some visible effect --- in 8.3 I see

regression=# select to_timestamp('1BC', 'YYYYA.D.');
to_timestamp
------------------------
0001-01-01 00:00:00-05
(1 row)

ie, failure to match means the field is silently ignored. In HEAD,

regression=# select to_timestamp('1BC', 'YYYYA.D.');
ERROR: invalid value "BC" for "A.D."
DETAIL: The given value did not match any of the allowed values for this field.

ie, failure to match means you get an error.

I guess though your point is that this is part of the general tightening
of to_timestamp()'s error checking, and doesn't need a separate entry?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2009-04-19 15:25:00 Re: to_timestamp() changes in 8.4 release notes
Previous Message Tom Lane 2009-04-19 14:51:14 Re: [PATCH] unalias of ACL_SELECT_FOR_UPDATE