Re: Recursive request ...
От | Greg Stark |
---|---|
Тема | Re: Recursive request ... |
Дата | |
Msg-id | 87n0fcjrwo.fsf@stark.dyndns.tv обсуждение исходный текст |
Ответ на | Re: Recursive request ... (Joe Conway <mail@joeconway.com>) |
Список | pgsql-sql |
Joe Conway <mail@joeconway.com> writes: > BenLaKnet wrote: > > I see connect by in Oracle > > ??? is there an equivalent in PostgreSQL or not ?? > > Someone is working on the SQL99 equivalent, but it isn't done yet. Perhaps for > 7.5. There's a connectby hack in the contrib/tablefunc directory. I haven't used it so I'm not clear on how powerful it is compared to the real deal, but people on one of the pgsql lists seemed to find it useful when it came up in the past. connectby(text relname, text keyid_fld, text parent_keyid_fld, text start_with, int max_depth [, text branch_delim]) - returns keyid, parent_keyid, level, and an optional branch string - requires anonymous compositetype syntax in the FROM clause. See the instructions in the documentation below. -- greg
В списке pgsql-sql по дате отправления: