Re: UNNEST with multiple args, and TABLE with multiple funcs - Mailing list pgsql-hackers

From David Johnston
Subject Re: UNNEST with multiple args, and TABLE with multiple funcs
Date
Msg-id 1385000368151-5779512.post@n5.nabble.com
Whole thread Raw
In response to Re: UNNEST with multiple args, and TABLE with multiple funcs  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas wrote
> select * from table(array(select generate_series(10,20,5)),
> array['fred','jim']);

Can we have our arrays and eat our functions too? (and is someone willing to
bake such a complicated cake...)

select * from table ( ARRAY | FUNCTION/SET [, ARRAY | FUNCTION/SET ]* )

The standard-compliant case is handled as required - and those who want to
write compliant code can use the array(select function) trick - while others
can avoid straining their eyes and fingers.

Since we would have to invent implicit unnesting anyway to conform, and the
function version is working currently, the suggested behavior would seem to
be the ideal target.


David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/UNNEST-with-multiple-args-and-TABLE-with-multiple-funcs-tp5767280p5779512.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



pgsql-hackers by date:

Previous
From: Asit Mahato
Date:
Subject: noob's query
Next
From: Tom Lane
Date:
Subject: Re: UNNEST with multiple args, and TABLE with multiple funcs