Re: Re: FWD: tinterval vs interval on pgsql-novice

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Re: FWD: tinterval vs interval on pgsql-novice
Дата
Msg-id Pine.LNX.4.21.0011281813330.1014-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: FWD: tinterval vs interval on pgsql-novice  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> template1=# select ('today', interval '1 day') OVERLAPS ('yesterday', interval
> '18 hours');
> ERROR:  parser: parse error at or near "overlaps"
> 
> I don't understand why we're getting a parse error here ...

The OVERLAPS special SQL-construct is converted into the 'select
overlaps(...)' function call, which isn't allowed because OVERLAPS is a
keyword.  *That* is where the parse error is coming from.

To fix this you simply need to double-quote "overlaps" when it's used as a
straight function call.  See how substring does it in pg_proc.h.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



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

Предыдущее
От: "Mitch Vincent"
Дата:
Сообщение: Re: beta testing version
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: Please advise features in 7.1 (SUMMARY)