Re: Selecting tree data

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
Cc: "Pat Maddox" <pergesu(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Selecting tree data
Date: 2007-10-26 08:19:31
Message-ID: 87sl3y70fg.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"D. Dante Lorenso" <dante(at)lorenso(dot)com> writes:

> Pat Maddox wrote:
>> I'd like to store some tree data in my database. I want to be able to
>> sort the data but maintain a tree structure....
>> Is it possible to pull all the data like that with one query? How do
>> I need to structure the table, and what query do I have to run in
>> order to make it happen?
>
> You need to look at the connectby function which is part of contrib.

Or ltree. Depending on how static your data is and what else you need to do
with it.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2007-10-26 08:53:39 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Previous Message Dave Page 2007-10-26 07:32:18 Re: subversion support?