X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E8D0B476021 for ; Mon, 3 Mar 2003 11:51:35 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 41926-03 for ; Mon, 3 Mar 2003 11:51:32 -0500 (EST) Received: from shield.pirmabanka.lv (unknown [195.114.57.4]) by postgresql.org (Postfix) with ESMTP id 75447475E13 for ; Mon, 3 Mar 2003 11:34:23 -0500 (EST) Received: from wall2.pirmabanka.lv (wall2-pub.pirmabanka.lv [195.114.57.14]) by shield.pirmabanka.lv (8.9.3/8.9.3) with SMTP id SAA17915 for ; Mon, 3 Mar 2003 18:34:26 +0200 Received: from share.pirmabanka.lv ([10.0.0.10]) by wall2.pirmabanka.lv; Mon, 03 Mar 2003 18:34:25 +0200 (EET) Received: from pc311x1.pirmabanka.lv (localhost.localdomain [127.0.0.1]) by pirmabanka.lv (8.11.6/8.11.6) with SMTP id h23GYPB21139 for ; Mon, 3 Mar 2003 18:34:25 +0200 Received: (qmail 16098 invoked by uid 100); 3 Mar 2003 16:34:36 -0000 Date: Mon, 3 Mar 2003 18:34:36 +0200 From: "Victor Yegorov" To: pgsql-sql@postgresql.org Subject: Re: Querying Hierarchical Data Message-ID: <20030303163436.GG9377@pirmabanka.lv> Mail-Followup-To: pgsql-sql@postgresql.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HB4mHL4PVvkpZAgW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/74 X-Sequence-Number: 12114 --HB4mHL4PVvkpZAgW Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Eric [03.03.2003 17:10]: > Hi, >=20 > How do I access hierarchical data under PostgreSQL? > Does it have SQL command similar to Oracle's CONNECT BY? >=20 > Any help is appreciated I've have the same problem recently. I've combined nested sets with adjacency list model, perfect solution, IMHO. Read more about nested sets here: http://www.brasileiro.net:8080/postgres/cookbook/view-recipes.adp?section_i= d=3D310&format=3Dlong --=20 Victor Yegorov --HB4mHL4PVvkpZAgW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+Y4Qc2RKGLEykUDYRAnlvAJ0Yomjpl2sf9Szcrb79ljwhTCE2pACggnBo DGRDN6U8Pv5f8TbHSk9ppEg= =kDNR -----END PGP SIGNATURE----- --HB4mHL4PVvkpZAgW--