From: | "paul(dot)dorman" <paul(dot)dorman(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | DAGs and recursive queries |
Date: | 2007-09-26 02:03:17 |
Message-ID: | 1190772197.434595.267060@19g2000hsx.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 the following operations for a
categorization system:
1. Given a node, get one or more field values out of every parent node
2. Given a parent node, get one or more field values out of every
child node
3. Given two or more parent nodes, identify any common children.
I do not need to determine shortest paths between parents and
children, only to be able to iterate over them as efficiently as
possible.
I'd like to keep things dynamic so changes up the hierarchy don't
require changes to any of the children (unless their direct parents
are changed). I'd also like to keep as much processing as possible in
the database to minimize the traffic between my application and the
DB, so I think I'm looking for SQL and stored procedure solutions.
Any pointers would be great, as I'm not a DBA and do not have the
experience to make judgments about the best possible approach.
Regards,
Paul Dorman
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2007-09-26 02:26:55 | Re: subquery/alias question |
Previous Message | Alvaro Herrera | 2007-09-25 22:30:48 | Re: subquery/alias question |