Re: Non-standard TIMESTAMP WITH TIME ZONE literal handling - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Non-standard TIMESTAMP WITH TIME ZONE literal handling
Date
Msg-id 15859.1060269894@sss.pgh.pa.us
Whole thread Raw
In response to Non-standard TIMESTAMP WITH TIME ZONE literal handling  (Troels Arvin <troels@arvin.dk>)
List pgsql-bugs
Troels Arvin <troels@arvin.dk> writes:
> In Jim Melton and Alan Simon's "SQL:1999 - Understanding Relational
> Language Components" (ISBN 1-55860-456-1), they write that the following
> is to be interpreted as a TIMESTAMP WITH TIME ZONE value:

> TIMESTAMP '2003-07-29 13:19:30.5+02:00'

> PostgreSQL interprets the above as a TIMESTAMP WITHOUT TIME ZONE value of
> '2003-07-29 13:19:30.5', i.e. it simply discards the '+02:00' part and
> fails to interpret it as being of TIMESTAMP WITH TIME ZONE type.

That's true, and I think we are unlikely to change it.  Postgres
interprets this construct as a special case of a general
    datatype_name 'literal string'
construction.  To allow the contents of the literal to determine the
datatype specification would break the general construct completely.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Troels Arvin
Date:
Subject: Non-standard TIMESTAMP WITH TIME ZONE literal handling
Next
From: Stephan Szabo
Date:
Subject: Re: Non-standard TIMESTAMP WITH TIME ZONE literal handling