Re: Selecting tree data - Mailing list pgsql-general

From D. Dante Lorenso
Subject Re: Selecting tree data
Date
Msg-id 47214A91.3050401@lorenso.com
Whole thread Raw
In response to Selecting tree data  ("Pat Maddox" <pergesu@gmail.com>)
Responses Re: Selecting tree data  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-general
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.

-- Dante

pgsql-general by date:

Previous
From: Jorge Godoy
Date:
Subject: Re: select count() out of memory
Next
From: "John D. Burger"
Date:
Subject: Re: Selecting K random rows - efficiently!