Re: [HACKERS] recursive views - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] recursive views
Date
Msg-id 199804161721.NAA22917@candle.pha.pa.us
Whole thread Raw
In response to recursive views  (Michael Meskes <meskes@topsystem.de>)
List pgsql-hackers
>
> I had some time during vacation to thing about postgresql. And here's the
> feature I'd really like to see. This one would put us miles in front of all
> others: recursive view definitions.
>
> Just one short example:
>
> There is that well-known parent relation: par (parent, child). The view anc
> now should list all ancestors:
>
> create view anc as
>     select parent as ancestor, child as person from par
>     union
>     select anc.ancestor as ancestor, par.child as person
>     from anc, par
>     where anc.person = par.parent;
>
> What do you guys think of this idea? How much work would it be to implement
> it?

You want views of UNION's.  That is not hard to do.


--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Constraints and inheritance
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] recursive views