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 12C35CB5B9 for ; Tue, 15 Jul 2003 06:42:18 +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 35862-08 for ; Tue, 15 Jul 2003 06:42:32 +0000 (GMT) Received: from neptune.adelis.net (neptune.adelis.net [195.115.171.102]) by svr1.postgresql.org (Postfix) with ESMTP id EB8BCCB56E for ; Tue, 15 Jul 2003 03:42:03 -0300 (ADT) Received: from adelis.com (ben.adelis.net [195.115.171.16]) by neptune.adelis.net (Postfix) with ESMTP id 34CC779493 for ; Tue, 15 Jul 2003 08:34:21 +0200 (CEST) Message-ID: <3F13A246.7040704@adelis.com> Date: Tue, 15 Jul 2003 08:42:14 +0200 From: =?ISO-8859-1?Q?Beno=EEt_Bournon?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.2.1) Gecko/20030225 X-Accept-Language: fr, en-us, en, ja MIME-Version: 1.0 Cc: pgsql-sql@postgresql.org Subject: Re: Recursive request ... References: <3F0C3469.2050106@adelis.com> <200307131217.02856.mallah@trade-india.com> In-Reply-To: <200307131217.02856.mallah@trade-india.com> Content-Type: multipart/alternative; boundary="------------080002020205060101060903" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/275 X-Sequence-Number: 14389 --------------080002020205060101060903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Thx a lot, I know now that it is possible to do that with pure sql. Have you the alogorythm, because your link is dead ? Ben Rajesh Kumar Mallah a écrit: >Dear Bournon, > >There are already good implementation of Tree >structures in databases ranging from using pure SQL >to PostgreSQL specfic methods , less point in >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=en&ie=UTF-8&oe=UTF-8&q=adjacency+list+%2B+tree+%2B+joe > > > >On Wednesday 09 Jul 2003 8:57 pm, Benoît 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 >> >> > > >---------------------------(end of broadcast)--------------------------- >TIP 4: Don't 'kill -9' the postmaster > > > --------------080002020205060101060903 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Thx a lot,  I know now that it is possible to do that with pure sql.



Have you the alogorythm, because your link is dead ?


Ben


Rajesh Kumar Mallah a écrit:
Dear Bournon,

There are already good implementation of Tree
structures in databases ranging from using pure SQL
to PostgreSQL specfic methods , less point in 
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=en&ie=UTF-8&oe=UTF-8&q=adjacency+list+%2B+tree+%2B+joe



On Wednesday 09 Jul 2003 8:57 pm, Benoît 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
    


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

  
--------------080002020205060101060903--