From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: postgres subfunction return error |
Date: | 2013-09-27 17:42:31 |
Message-ID: | 1380303751878-5772627.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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 way so my help is more theory but:
The called-function already created the cursors. In the parent function you
should simply be able to pass them through unaltered:
SELECT * INTO v_outvar1, ...;
swv_refcur := v_outvar1;
...
...
RETURN;
You can possible simply the above and toss the temporary variables but that
should not impact the semantics.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/postgres-subfunction-return-error-tp5772407p5772627.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Jelinek | 2013-09-27 19:24:11 | Re: Can I simplify this somehow? |
Previous Message | Larry Rosenman | 2013-09-27 15:22:09 | Can I simplify this somehow? |