Re: Hierarchical queries a la Oracle. Patch.

Поиск
Список
Период
Сортировка
От Fernando Nasser
Тема Re: Hierarchical queries a la Oracle. Patch.
Дата
Msg-id 3DE4036F.4020705@redhat.com
обсуждение исходный текст
Ответ на Hierarchical queries a la Oracle. Patch.  (Evgen Potemkin <evgent@ns.terminal.ru>)
Ответы Re: Hierarchical queries a la Oracle. Patch.  (Evgen Potemkin <evgent@ns.terminal.ru>)
Список pgsql-patches
Fernando Nasser wrote:> The syntax below is wrong.  Oracle has:
>
> [START WITH condition] CONNECT BY condition
>
> not the reverse as stated below.  Maybe this was just a documentation
> mistake (I haven't looked at the code).
>
> Fernando
>
> Evgen Potemkin wrote:
>
>> + + Syntax.
>> + + SELECT ... FROM ... [ WHERE condition ] CONNECT BY c_expr PRIOR
>> c_expr START WITH expr +   [ HAVING condition [, ...]] [ LIMIT ... ] [
>> OFFSET ... ]
>> +
>

Furthermore, PRIOR is not a clause, but a unary operator that must be applied to
one of the terms of the CONNECT BY expression.

So, we would actually have:

[START WITH expr] CONNECT BY c_expr = PRIOR c_expr
or
[START WITH expr] CONNECT BY PRIOR c_expr = c_expr

(we probably don't want to support operators other than '=')


And there is that '+' in there... what is it for?


So I guess we would be implementing something that is not either the standard
SQL nor the Oracle syntax.



--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: [HACKERS] Hirarchical queries a la Oracle. Patch.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Resultmap for FreeBSD 4.7