Re: Tree structure

From: Zeljko Trogrlic <zeljko(at)technologist(dot)com>
To: "Trewern, Ben" <Ben(dot)Trewern(at)mowlem(dot)com>, "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Tree structure
Date: 2000-09-11 16:30:55
Message-ID: 4.1.20000911182824.018d5078@192.168.0.7
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

<html>
Normally it's done with self-relation. You need a table with
&quot;ID&quot; and &quot;PARENT_ID&quot;. PARENT_ID will contain null for
root level and other row's ID for children. One warning: going through
such tree could be slow. I don't know is there anything PostgreSQL
specific that might help. I know that Oracle have a special tree
command.<br>
<br>
At 14:27 11.9.2000 , Trewern, Ben wrote: <br>
<br>
<font size=2><blockquote type=cite cite>Anybody know how to make a tree
structure using related tables using Postgres.&nbsp; Something like a
directory structure is what I'm aiming for.&nbsp; I'm sure there is an
easy way but I'm having probs.<br>
</font><br>
Any help would be appreciated. <br>
<br>
<font size=2>Ben.</font> </blockquote><br>
</html>

Attachment Content-Type Size
unknown_filename text/html 769 bytes

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message G. Anthony Reina 2000-09-11 23:37:43 How can I select all of the tables with field name 'area'?
Previous Message Albert REINER 2000-09-11 16:25:58 Re: Tree structure