necessarily endorse content contained within this transmission.
> From: [EMAIL PROTECTED]
> Subject: [GENERAL] Getting rows in a very specific order
> Date: Mon, 8 Sep 2008 09:29:44 -0700
> To: pgsql-general@postgresql.org
>
> I'm considering using an array of ints column i
On Mon, Sep 8, 2008 at 12:29 PM, Gordon <[EMAIL PROTECTED]> wrote:
> I'm considering using an array of ints column in a table which lists a
> row's ancestry. For example, if item 97 is contained within itme 68
> and that item is contained with in 31 and that item is contained
> within item 1 then
If I use the value of the hierarchy column in a query I can get all
the rows that a given row is an descendant of. (SELECT * FROM items
WHERE itm_id IN (1,31,68,97), for example. However, I need the rows
to be in the correct order, ie the root node first, child second,
grandchild third etc. I
I'm considering using an array of ints column in a table which lists a
row's ancestry. For example, if item 97 is contained within itme 68
and that item is contained with in 31 and that item is contained
within item 1 then the value of the hierachy column would be
{1,31,68,97}, the numbers refer t