Re: 7.2b Timestamp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.2b Timestamp
Дата
Msg-id 8353.1005775838@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 7.2b Timestamp  (Dave Smith <dave@candata.com>)
Список 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 по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: index on numbers not honoured
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: 7.2b Timestamp