Re: bug or change in functionality in 7.2?

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: bug or change in functionality in 7.2?
Дата
Msg-id 3BF54CDC.6080709@xythos.com
обсуждение исходный текст
Ответ на bug or change in functionality in 7.2?  (Barry Lind <barry@xythos.com>)
Список pgsql-hackers
Thanks for the quick help.  I have changed my code accordingly.

--Barry

Tom Lane wrote:

> Barry Lind <barry@xythos.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
>
>



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Further open item (Was: Status of 7.2)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Plpython crashing the backend in one easy step - fix