pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Caune <daniel.caune@ubisoft.com>
To: postgresql sql list <pgsql-sql@postgresql.org>
Subject: connectby documentation
Date: Mon, 13 Mar 2006 10:37:37 -0500
Message-ID: <1E293D3FF63A3740B10AD5AAD88535D201C34616@UBIMAIL1.ubisoft.org> (raw)

Hi,

I'm searching for an Oracle START WITH ... CONNECT BY PRIOR ...
equivalence.  It seems that PostgreSQL (version >= 7.4) supports a
function connectby that provides similar feature.  Unfortunately I don't
find any documentation on that function.  Could you please give me a
link on such documentation?

Note: Just an example of the Oracle START WITH ... CONNECT BY PRIOR ...
behaviour.

          4        |
          |        |
          2        |
         / \       |
        1   3      | Hierarchy dependency order
       / \  |      |
      5   | 6      |
          |/       |
          7        V

  SELECT JobId, JobParentId
    FROM JobDependency
    START WITH JobParentId IN (
      _Root_Datamarts_ )
    CONNECT BY PRIOR JobId = JobParentId

  JOBID JOBPARENTID
  ----- -----------
      2           4
      1           2
      5           1
      7           1
      3           2
      6           3
      7           6

Regards,


--
Daniel



view thread (14+ messages)  latest in thread

Message-ID: <1E293D3FF63A3740B10AD5AAD88535D201C34616@UBIMAIL1.ubisoft.org>
Permalink:  ../1E293D3FF63A3740B10AD5AAD88535D201C34616@UBIMAIL1.ubisoft.org/
Also on:    postgresql.org/message-id/1E293D3FF63A3740B10AD5AAD88535D201C34616@UBIMAIL1.ubisoft.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: daniel.caune@ubisoft.com
  Subject: Re: connectby documentation
  In-Reply-To: <1E293D3FF63A3740B10AD5AAD88535D201C34616@UBIMAIL1.ubisoft.org>
  References: <1E293D3FF63A3740B10AD5AAD88535D201C34616@UBIMAIL1.ubisoft.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox