Re: Recursive query syntax ambiguity

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Recursive query syntax ambiguity
Дата
Msg-id 20070126204251.GC24276@svana.org
обсуждение исходный текст
Ответ на Recursive query syntax ambiguity  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: Recursive query syntax ambiguity  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jan 26, 2007 at 05:10:01PM +0000, Gregory Stark wrote:
> However to fully support the DB2/ANSI syntax we would definitely have an
> ambiguity and I think we would have to make "CYCLE" a fully reserved word
> which seems like a much bigger concession than "WITH". Observe the following
> case:
>
>   WITH RECURSIVE foo (x,y) AS (select 1,2) SEARCH DEPTH FIRST BY x CYCLE x,y SET ...
>
> The parser can't search arbitrarily far checking for a SET to see if the CYCLE
> is a keyword or a binary operator.

Er, CYCLE isn't a binary operator, and users can't make binary
operators that are words, so I'm not sure of the problem here.
I think the parser can tell that the expression ends at the word
"cycle".

Or am I missing obvious?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: NULL value in subselect in UNION causes error
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: NULL value in subselect in UNION causes error