Re: calling a function that takes a row type and returns a set of rows

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: "Dimitri Fontaine" <dfontaine(at)hi-media(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: calling a function that takes a row type and returns a set of rows
Date: 2008-10-10 20:43:54
Message-ID: 603c8f070810101343v15fc74f1nedf299e7069d2e49@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> You need LATERAL support for this:
> SELECT * FROM foo f LATERAL bar(f);
>
> I'm not sure about the syntax, but LATERAL is a standard JOIN type wherein
> upper "nodes" are visible.

That would be really nice. Then you could presumably also do:

SELECT f.id, f.name, f.apple, f.banana, bar.apple AS bar_apple,
bar.banana AS bar_banana FROM foo f LATERAL bar(f);

...which I frequently wish to do, and can't.

...Robert

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-10-10 21:43:46 Re: Re: [Pkg-postgresql-public] Postgres major version support policy on Debian
Previous Message Tom Lane 2008-10-10 20:43:33 Re: Bug In COPY TO?