X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id D650DCB56A for ; Sun, 13 Jul 2003 06:47:20 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 04747-04 for ; Sun, 13 Jul 2003 06:47:10 +0000 (GMT) Received: from rtlocal.trade-india.com (mail-relay.trade-india.com [203.196.129.235]) by svr1.postgresql.org (Postfix) with SMTP id 76CD6CB56E for ; Sun, 13 Jul 2003 03:46:45 -0300 (ADT) Received: (qmail 27020 invoked from network); 13 Jul 2003 06:54:59 -0000 Received: from unknown (HELO system67.trade-india-local.com) (unknown) by unknown with SMTP; 13 Jul 2003 06:54:59 -0000 From: Rajesh Kumar Mallah Organization: Infocom Network Limited To: =?iso-8859-1?q?Beno=EEt=20Bournon?= , pgsql-sql@postgresql.org Subject: Re: Recursive request ... Date: Sun, 13 Jul 2003 12:17:02 +0530 User-Agent: KMail/1.5.1 References: <3F0C3469.2050106@adelis.com> In-Reply-To: <3F0C3469.2050106@adelis.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200307131217.02856.mallah@trade-india.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/152 X-Sequence-Number: 14266 Dear Bournon, There are already good implementation of Tree structures in databases ranging from using pure SQL to PostgreSQL specfic methods , less point in=20 revinting wheel unless u really need. Some Pointers: "Tree-structure functions" http://www.brasileiro.net:8080/postgres/cookbook/ Gist Based: contrib/ltree Joe Celko's Article on "Nested Sets & Adjacency Lists" http://www.ibase.ru/devinfo/DBMSTrees/sqltrees.html http://users.starpower.net/rjhalljr/Serve/MySQL/traer.html http://www.google.com/search?hl=3Den&ie=3DUTF-8&oe=3DUTF-8&q=3Dadjacency+li= st+%2B+tree+%2B+joe On Wednesday 09 Jul 2003 8:57 pm, Beno=EEt Bournon wrote: > I have to make a function that returns a tree with title and link of a > table. > > Recursively, a information depends on a parent information. > > It is to organise a menu with parent dependance. > > How is it possible and faster ? in C ? pl/pgsql or other ? > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster