Re: Dynamic SELECT condition

From: Oleg Samoylov <olleg(at)telecom(dot)mipt(dot)ru>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Dynamic SELECT condition
Date: 2003-03-03 13:30:31
Message-ID: b3vldk$1a47$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Victor Yegorov wrote:
> I mean, I know the id of a root object, it's 3. If I'll extract with
> condition parent_id =3D 3, then I'll get only 2 rows. I'd like to have a
> recursive result set - while there are records in the table for which
> count(next_level_parent_id =3D=3D this_level_child_id) > 0, select parent_i=
> d, child_id.
>
> I hope you'll understand my problem.

As I can undestand you problem, I can use function returned resultset
for this purpose.

--
Olleg Samoylov

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Lex Berezhny 2003-03-03 15:31:51 Re: Querying Hierarchical Data
Previous Message Oleg Samoylov 2003-03-03 13:22:51 Re: Executing SQL commands via triggers without the use of procedures