Hurray, that works!
Many thanks David
CREATE OR REPLACE FUNCTION custom.pr_test_parentfunction (
v_action varchar,
out swv_refcur refcursor,
out swv_refcur2 refcursor,
out swv_refcur3 refcursor
)
RETURNS record AS
$body$
DECLARE
SWV_Action VARCHAR(50) DEFAULT Coalesce(v_Act
jonathansfl wrote
> SELECT * INTO v_outvar1, v_outvar2, v_outvar3 FROM
> custom.pr_test_subfunction(SWV_Action);
> OPEN swv_refcur for SELECT v_outvar1;
> OPEN swv_refcur2 for SELECT v_outvar2;
> OPEN swv_refcur3 for SELECT v_outvar3;
> RETURN;
I've never used cursors in this
I'm trying to pass a REFCURSOR variable from a subfunction to its parent
calling function, who will then pass it to the user (for parsing).
thanks to David J I fixed it somewhat, but the user now receives the TEXT of
(etc.) instead of the actual data in that REFCURSOR
variable.
I think the proble
Thank you!
What kind of variable would I declare? Is this any form of right?
No change to subfunction.
In PARENT Function:
DECLARE v_outvar1 REFCURSOR; v_outvar2 REFCURSOR; v_outvar3 REFCURSOR;
?And use:
SELECT * INTO v_outvar1, v_outvar2, v_outvar3 FROM
dev.pr_test_subfunction(SWV_Action);
jonathansfl wrote
> greetings. I'm trying to write a function that acts like a switchboard,
> calling other functions depending on incoming parameters.
> I'm getting error: query has no destination for result data
>
>
> SELECT * FROM dev.pr_test_subfunction(SWV_Action);
In pl/pgsql if you
greetings. I'm trying to write a function that acts like a switchboard,
calling other functions depending on incoming parameters.
I'm getting error: query has no destination for result data
Please advise what we're doing wrong. The subfunctions return a series of
refcursors in a single table and si