From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Barry Lind <barry(at)xythos(dot)com> |
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 05:26:40 |
Message-ID: | 23264.1005888400@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
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 | Sunit Bhatia | 2001-11-16 07:26:33 | Re: Database server crash ! URGENT ! |
Previous Message | Bruce Momjian | 2001-11-16 04:51:47 | Re: 7.2 pg_hba.conf load on SIGHUP? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tille, Andreas | 2001-11-16 07:55:08 | Further open item (Was: Status of 7.2) |
Previous Message | Bruce Momjian | 2001-11-16 04:50:15 | Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well) |