From: | Barry Lind <barry(at)xythos(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, chriskl(at)familyhealth(dot)com(dot)au |
Cc: | pgsql-general(at)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] bug or change in functionality in 7.2? |
Date: | 2001-11-16 17:29:00 |
Message-ID: | 3BF54CDC.6080709@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Thanks for the quick help. I have changed my code accordingly.
--Barry
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
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Aasmund Midttun Godal | 2001-11-16 17:30:19 | Re: pgsql and large tables |
Previous Message | Stephan Szabo | 2001-11-16 16:48:14 | Re: Precision problems with float8 |
From | Date | Subject | |
---|---|---|---|
Next Message | Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= | 2001-11-16 17:47:27 | Re: 7.2b2 "make check" failure on Red Hat Linux 7.2 |
Previous Message | Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= | 2001-11-16 17:17:06 | 7.2b2 "make check" failure on Red Hat Linux 7.2 |