Re: [GENERAL] DAGs and recursive queries

2007-10-01 Thread paul.dorman
Thanks for your answers guys. I've got a cold right now and my brain is mush, so I can't comment intelligently on your suggestions just yet. I just wanted to express my thanks for your time. Jeff, one book you might want to look at is Joe Celko's Trees and Hierarchies in SQL for Smarties. http://

Re: [GENERAL] DAGs and recursive queries

2007-09-28 Thread Jeff Davis
On Thu, 2007-09-27 at 23:58 +0100, Gregory Stark wrote: > It keeps the same information in more than one place. Consider: > > 1 > 1.1 > 1.1.1 > > Note that all three records contain the root's id of "1". If you want to > reparent 1.1 to be 2.1 you have to know that all its children also need to b

Re: [GENERAL] DAGs and recursive queries

2007-09-27 Thread Gregory Stark
"Jeff Davis" <[EMAIL PROTECTED]> writes: > On Wed, 2007-09-26 at 16:54 +0100, Gregory Stark wrote: > >> You could check out the tablefunc contrib which includes a function called >> connectby() which implements a kind of recursive query. >> >> Alternatively you might look at the ltree contrib mo

Re: [GENERAL] DAGs and recursive queries

2007-09-27 Thread Jeff Davis
On Wed, 2007-09-26 at 16:54 +0100, Gregory Stark wrote: > "paul.dorman" <[EMAIL PROTECTED]> writes: > > > Hi everyone, > > > > I would like to know the best way to implement a DAG in PostgreSQL. I > > understand there has been some talk of recursive queries, and I'm > > wondering if there has been

Re: [GENERAL] DAGs and recursive queries

2007-09-26 Thread Oleg Bartunov
take a look on contrib/ltree On Wed, 26 Sep 2007, paul.dorman wrote: Hi everyone, I would like to know the best way to implement a DAG in PostgreSQL. I understand there has been some talk of recursive queries, and I'm wondering if there has been much progress on this. Are there any complete e

Re: [GENERAL] DAGs and recursive queries

2007-09-26 Thread Gregory Stark
"paul.dorman" <[EMAIL PROTECTED]> writes: > Hi everyone, > > I would like to know the best way to implement a DAG in PostgreSQL. I > understand there has been some talk of recursive queries, and I'm > wondering if there has been much progress on this. The ANSI recursive queries didn't make it in

[GENERAL] DAGs and recursive queries

2007-09-26 Thread paul.dorman
Hi everyone, I would like to know the best way to implement a DAG in PostgreSQL. I understand there has been some talk of recursive queries, and I'm wondering if there has been much progress on this. Are there any complete examples of DAGs which work with PostgreSQL? I would like to be able to do