LATERAL synopsis

From: "Erik Rijkers" <er(at)xs4all(dot)nl>
To: pgsql-docs(at)postgresql(dot)org
Subject: LATERAL synopsis
Date: 2012-10-27 15:54:25
Message-ID: eeb2ce6a1a2476265b08eabbaad7e218.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On the SELECT manual-page synopsis,

http://www.postgresql.org/docs/devel/static/sql-select.html

the LATERAL feature is documented in three sparate lines (the are separate, right?). Because of
their length I was going to reformat them to let them fit in the .PDF page format, but looking a
bit closer at that synopsis I have to admit I don't really understand it. Could someone please
explain?

[ LATERAL ] ( select ) [ AS ] alias [ ( column_alias [, ...] ) ]

and:

[ LATERAL ] function_name ( [ argument [, ...] ] ) [ AS ] alias [ ( column_alias [, ...] |
column_definition [, ...] ) ]

and:

[ LATERAL ] function_name ( [ argument [, ...] ] ) AS ( column_definition [, ...] )

All three are listed as possible 'from_item's.

But what does 'column_definition' stand for? (These are the only occurrences of
'column_definition' in the manual.)

Are not the first two of the above LATERAL-lines sufficient? Or perhaps it would be even better
to reduce it to only the first of those three lines (i.e. get rid of the 'function_name' lines)?

Thanks,

Erik Rijkers

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2012-10-27 16:44:43 Re: LATERAL synopsis
Previous Message Josh Kupershmidt 2012-10-26 23:58:13 example for PGRES_COMMAND_OK