Tom Lane writes:
> > What concerns me is that we're inserting table-generating
> > syntax elements into the select list, which is where they've never
> > belonged.
>
> Do you see another way to pass non-constant arguments to the
> table-generating function?
SELECT * FROM table1 AS t1, table2 AS t2, func1(t1.col, t2.col) ... ?
That's a syntax that would make sense to me.
With sufficiently blurred vision one might even find SQL99's clause
<collection derived table> ::=
UNNEST <left paren> <collection value expression> <right paren>
<table primary> ::=
<table or query name> [ [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ] ]
| <derived table> [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ]
| <lateral derived table> [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ]
| <collection derived table> [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ]
| <only spec>
[ [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ] ]
| <left paren> <joined table> <right paren>
applicable. Or maybe not.
--
Peter Eisentraut peter_e@gmx.net