Re: Sorting with materialized paths

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ovid <curtis_ovid_poe(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Sorting with materialized paths
Date: 2010-05-09 15:47:36
Message-ID: 4000.1273420056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ovid <curtis_ovid_poe(at)yahoo(dot)com> writes:
> My apologies. This isn't PG-specific, but since this is running on PostgreSQL 8.4, maybe there are specific features which might help.
> I have a tree structure in a table and it uses materialized paths to allow me to find children quickly. However, I also need to sort the results depth-first, as one would expect with threaded forum replies.

I think contrib/ltree might help you here. However, it seems to sort
node names textually rather than numerically, so you might need to
change it a bit for your own purposes.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-05-09 15:53:47 Re: Urgent please: PGPOOL II 2.3.3 hang in ssl mode
Previous Message A. Kretschmer 2010-05-09 15:23:43 Re: PG 8.3.7. Windows 7. select inet_server_addr() returns ::1 - the loopback adrs.