Search Postgresql Archives

Re: set returning function with variable argument - possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 16 Jun 2011, David Johnston wrote:

The only way to feed another relation into a function is to place the
function in the SELECT list.  If you then want to expand the result of the
function call you alias the function result and then ".*" against it.

WITH feeder AS (
SELECT f(var) AS result FROM xtable WHERE ...
)
SELECT (feeder.result).*
FROM feeder
;

[snip]

Thanks, David, this worked perfectly!  {thanks also to Pavel}

	-Frank

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux