Re: bug or change in functionality in 7.2?

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us
Subject: Re: bug or change in functionality in 7.2?
Date: 2001-11-16 15:24:24
Message-ID: 20011116092424.A7120@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

This needs to be highlighted in the release notes/history/migration
docs, whatever. both interval() and timestamp(), since that was a
(wrong) way to do casts, in the past.

Ross

On Fri, Nov 16, 2001 at 12:26:40AM -0500, Tom Lane wrote:
> Barry Lind <barry(at)xythos(dot)com> writes:
> > select period_start + interval('1 hour') from periods;
> > This worked in 7.1, but in 7.2 I am getting the following error:
> > ERROR: parser: parse error at or near "'"
>
> "interval" is a more reserved word than it used to be ("timestamp"
> is too). This is because interval(n) is now a type name, not a
> function name, because we now support SQL92's notion of precision
> specs for intervals and timestamps. That means using "interval"
> as an unquoted function name doesn't work anymore.
>
> I concur with Christopher's recommendation: use the syntax
> interval '1 hour'
> Other possibilities are
> cast('1 hour' as interval)
> "interval"('1 hour')
> '1 hour'::interval
> The last two are Postgres-isms, the first two are SQL92 standard
> notations that we'll try not to break in future.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message wsheldah 2001-11-16 15:26:24 Re: Idle in transaction ????
Previous Message Helge Bahmann 2001-11-16 15:21:45 Re: Poor performance on SCSI machines, good on IDE?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-11-16 15:29:27 Re: import/export of large objects on server-side
Previous Message Tom Lane 2001-11-16 15:17:18 Re: ecpg test problem