Re: 7.2b Timestamp - Mailing list pgsql-general

From Tom Lane
Subject Re: 7.2b Timestamp
Date
Msg-id 8353.1005775838@sss.pgh.pa.us
Whole thread Raw
In response to 7.2b Timestamp  (Dave Smith <dave@candata.com>)
List pgsql-general
Dave Smith <dave@candata.com> writes:
> Has some thing changed with the timestamp function since 7.0

The word "timestamp" is more reserved than it used to be, because
7.2 adds support for SQL92 timestamp precision options ---
timestamp(6) is now a type name, not a function call.

This means you need to write
    select "timestamp"(date '1998-02-24', time '23:07');
to get the result you are after.  Pain in the neck, I agree.

Actually, if the result you are after is timestamp with time zone,
you might try
    select timestamptz(date '1998-02-24', time '23:07');
to avoid needing quotes.

            regards, tom lane

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: index on numbers not honoured
Next
From: Thomas Lockhart
Date:
Subject: Re: 7.2b Timestamp