Thread: BUG #2350: Timezone string fails in a certain context (see below).

BUG #2350: Timezone string fails in a certain context (see below).

From
"Gloria W"
Date:
The following bug has been logged online:

Bug reference:      2350
Logged by:          Gloria W
Email address:      strangest@comcast.net
PostgreSQL version: 8.1.2
Operating system:   Red Hat  2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27 EDT
Description:        Timezone string fails in a certain context (see below).
Details:

This statement works just fine:

insert into tasks (client_id, task_id, scheduled_time,
scheduled_time_required) values(699,4,('2006-03-20 09:06:00 PST' at time
zone 'US/Eastern'),'2006-03-20 06:00:00');
INSERT 0 1


But this one fails:

lii_hardware=# insert into tasks (client_id, task_id, scheduled_time,
scheduled_time_required) values(699,4,('2006-03-20 09:06:00 US/Pacific' at
time zone 'US/Eastern'),'2006-03-20 06:00:00');
ERROR:  invalid input syntax for type timestamp with time zone: "2006-03-20
09:06:00 US/Pacific"


The only difference between the two is the PST timezone string was replaced
with a longer, also correct, timezone string.

Thank you in advance for your help.

Gloria

Re: BUG #2350: Timezone string fails in a certain context (see below).

From
Tom Lane
Date:
"Gloria W" <strangest@comcast.net> writes:
> ERROR:  invalid input syntax for type timestamp with time zone: "2006-03-20
> 09:06:00 US/Pacific"

That is not currently supported, sorry.  Timestamp input can only use
the timezone names known to the "date token table", which basically
is the short abbreviations like PST.  It'll get fixed eventually but
it's a feature enhancement not a bug.

            regards, tom lane

Re: BUG #2350: Timezone string fails in a certain context

From
Gloria
Date:
Thank you. I appreciate this quick response.
Gloria

>"Gloria W" <strangest@comcast.net> writes:
>
>
>>ERROR:  invalid input syntax for type timestamp with time zone: "2006-03-20
>>09:06:00 US/Pacific"
>>
>>
>
>That is not currently supported, sorry.  Timestamp input can only use
>the timezone names known to the "date token table", which basically
>is the short abbreviations like PST.  It'll get fixed eventually but
>it's a feature enhancement not a bug.
>
>            regards, tom lane
>
>
>