Re: Dynamic SELECT condition

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Victor Yegorov <viy(at)pirmabanka(dot)lv>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Dynamic SELECT condition
Date: 2003-03-02 04:46:43
Message-ID: 20030302044643.GA18183@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, Feb 24, 2003 at 19:53:00 +0200,
Victor Yegorov <viy(at)pirmabanka(dot)lv> wrote:
>
> I mean, I know the id of a root object, it's 3. If I'll extract with
> condition parent_id = 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 == this_level_child_id) > 0, select parent_id, child_id.

contrib/tablefunc will probably allow you to do what you want.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-03-02 06:10:05 Re:
Previous Message Metnetsky 2003-03-02 04:20:29 HardCORE QUERY HELP!!!