Re: Are there any changes to INTERVAL in 7.2

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Are there any changes to INTERVAL in 7.2
Дата
Msg-id 20021111175515.T58551-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Are there any changes to INTERVAL in 7.2  ("Mr OCP" <mr_ocp@hotmail.com>)
Список pgsql-admin
On Mon, 11 Nov 2002, Mr OCP wrote:

> Hi
>
> The following query involving INTERVAL works very well in 7.1 but does not
> work under 7.2
>
> SELECT order_id FROM order
> WHERE  order_date + INTERVAL
> (term ||'year') < current_timestamp;
>
> Are there any changes to this functionality in 7.2 from 7.1.

From the release notes:

     * The  timestamp(),  time(),  and  interval()  functions  are no
longer available. Instead of timestamp(), use timestamp 'string' or CAST.

Try CAST(term || 'year' as INTERVAL)


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

Предыдущее
От: "Mr OCP"
Дата:
Сообщение: Are there any changes to INTERVAL in 7.2
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: constraint notices