Re: calling a function that takes a row type and returns a set of rows - Mailing list pgsql-general

From Robert Haas
Subject Re: calling a function that takes a row type and returns a set of rows
Date
Msg-id 603c8f070810101343v15fc74f1nedf299e7069d2e49@mail.gmail.com
Whole thread Raw
In response to Re: calling a function that takes a row type and returns a set of rows  (Dimitri Fontaine <dfontaine@hi-media.com>)
List 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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug In COPY TO?
Next
From: "Scott Marlowe"
Date:
Subject: Re: Re: [Pkg-postgresql-public] Postgres major version support policy on Debian