Re: v7.0.2: can't use 'EXTRACT(EPOCH FROM'

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: v7.0.2: can't use 'EXTRACT(EPOCH FROM'
Дата
Msg-id 3B7096CB.C2ADB773@fourpalms.org
обсуждение исходный текст
Ответ на v7.0.2: can't use 'EXTRACT(EPOCH FROM'  (Trevin Chow <tmchow@sfu.ca>)
Список pgsql-bugs
> SELECT EXTRACT(EPOCH FROM TIMESTAMP '2001-02-16 20:38:40');
> This example won't run on the v7.0.3...
> However, the same SQL sample runs on v7.1.2.  Am I doing something wrong
> here? Is this a known bug?

For versions prior to 7.1 (and for current versions also), try

  SELECT EXTRACT('epoch' FROM TIMESTAMP '2001-02-16 20:38:40');

(note the single quotes around "epoch"). 7.1.x also allows the
non-quoted form you gave as an example.

                       - Thomas

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Nabil Sayegh
Дата:
Сообщение: Re: locale and german umlauts
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: timestamp handling in postgres 7.1 behaves strange