tree-structured query

From: chester c young <chestercyoung(at)yahoo(dot)com>
To: sql pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: tree-structured query
Date: 2006-09-29 22:00:15
Message-ID: 20060929220015.40971.qmail@web54309.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alexander Ilyin 2006-09-30 08:43:40 How to FindNearest
Previous Message chester c young 2006-09-29 21:31:12 regexp_replace usage