From: chester c young <chestercyoung@yahoo.com>
To: sql pgsql <pgsql-sql@postgresql.org>
Subject: tree-structured query
Date: Fri, 29 Sep 2006 15:00:15 -0700 (PDT)
Message-ID: <20060929220015.40971.qmail@web54309.mail.yahoo.com> (raw)
in a simple tree structured table
table t(
id primary key,
pnt_id references t( id ),
name
);
does anyone know an easy howbeit sneaky way of determining ancestory and decendency without recursive functions,
select name from t where exists <ancestor or descendent>
thanks for insight
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chestercyoung@yahoo.com
Subject: Re: tree-structured query
In-Reply-To: <20060929220015.40971.qmail@web54309.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox