LATERAL synopsis - Mailing list pgsql-docs

From Erik Rijkers
Subject LATERAL synopsis
Date
Msg-id eeb2ce6a1a2476265b08eabbaad7e218.squirrel@webmail.xs4all.nl
Whole thread Raw
Responses Re: LATERAL synopsis  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-docs by date:

Previous
From: Josh Kupershmidt
Date:
Subject: example for PGRES_COMMAND_OK
Next
From: Tom Lane
Date:
Subject: Re: LATERAL synopsis