pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Joe Conway <mail@joeconway.com>
Cc: BenLaKnet <benlaknet@icqmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Recursive request ...
Date: 18 Jul 2003 02:00:23 -0400
Message-ID: <87n0fcjrwo.fsf@stark.dyndns.tv> (raw)
In-Reply-To: <3F16E00A.6020806@joeconway.com>
References: <3F0C3469.2050106@adelis.com>
	<200307131217.02856.mallah@trade-india.com>
	<3F1645BF.908@icqmail.com>
	<3F16E00A.6020806@joeconway.com>

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 composite type syntax in the FROM clause. See
        the instructions in the documentation below.


-- 
greg




view thread (9+ messages)

Message-ID: <87n0fcjrwo.fsf@stark.dyndns.tv>
Permalink:  ../87n0fcjrwo.fsf@stark.dyndns.tv/
Also on:    postgresql.org/message-id/87n0fcjrwo.fsf@stark.dyndns.tv

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gsstark@mit.edu, mail@joeconway.com, benlaknet@icqmail.com
  Subject: Re: Recursive request ...
  In-Reply-To: <87n0fcjrwo.fsf@stark.dyndns.tv>

* 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