Re: Are there any changes to INTERVAL in 7.2

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Mr OCP <mr_ocp(at)hotmail(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Are there any changes to INTERVAL in 7.2
Date: 2002-11-12 01:55:58
Message-ID: 20021111175515.T58551-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2002-11-12 04:28:29 Re: constraint notices
Previous Message Mr OCP 2002-11-12 01:35:45 Are there any changes to INTERVAL in 7.2