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
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);
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
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