Re: Command "connect by prior" in PostgreSQL ?

From: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Command "connect by prior" in PostgreSQL ?
Date: 2007-01-08 16:41:53
Message-ID: 45A27451.2070909@wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Take a look at contrib/tablefunc there is a function called connectby()
that should do what you're looking for.

Otherwise roll your own...

http://archives.postgresql.org/pgsql-sql/2003-10/msg00374.php

John

Thomas Kellerer wrote:
> On 08.01.2007 17:24 Scott Marlowe wrote:
>> On Mon, 2007-01-08 at 07:38, Leandro Repolho wrote:
>>> Hello everybody,
>>> In Oracle i use the command "connect by prior" and i need to use it in
>>> PostgreSQL, what is the sintax?
>>
>> What does connect by prior do? Reuse a connection from one db to
>> another? I don't think there's anything like that in postgresql.
>> You might wanna tell us what an oracle command does next time, since
>> many folks here aren't that familiar with Oracle. Heck, I use oracle
>> everyday and I'm not familiar with connect by prior...
>
> It's used to retrieve hierarchical data e.g. a parent/child
> relationship. The connect by operator defines the columns which define
> the hierarchy.
>
> Thomas
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Dale 2007-01-08 16:42:42 Re: Discovering time of last database write
Previous Message Erik Jones 2007-01-08 16:34:36 Re: Discovering time of last database write