Re: [GENERAL] set returning function with variable argument - possible?

2011-06-18 Thread Frank Miles
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

[GENERAL] set returning function with variable argument - possible?

2011-06-16 Thread Frank Miles
I have a function that returns a set of a defined type, something like: CREATE OR REPLACE FUNCTION f(arg) RETURNS SETOF return_type AS $$ ... $$ LANGUAGE 'plpgsql' STABLE with (isstrict); Ordinarily this function is called: SELECT * FROM f(constant);

Re: [GENERAL] set returning function with variable argument - possible?

2011-06-16 Thread Pavel Stehule
Hello I don't know if I understand well, but you can do select (f).* from (select f(var) from xtable where ...) x; Regards Pavel Stehule 2011/6/16 Frank Miles f...@u.washington.edu: I have a function that returns a set of a defined type, something like:        CREATE OR REPLACE FUNCTION

Re: [GENERAL] set returning function with variable argument - possible?

2011-06-16 Thread David Johnston
returning function with variable argument - possible? I have a function that returns a set of a defined type, something like: CREATE OR REPLACE FUNCTION f(arg) RETURNS SETOF return_type AS $$ ... $$ LANGUAGE 'plpgsql' STABLE with (isstrict); Ordinarily