From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: postgres subfunction return error |
Date: | 2013-09-25 23:19:27 |
Message-ID: | 1380151167590-5772408.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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 do not use an "INTO" clause on a select statement you
must replace the "SELECT" with "PERFORM". Failing to do so results in the
error you are seeing. In this case your calls to the sub-function do not
magically populate the parent function variables. You must manually map the
output of the sub-function call query onto the parent variables.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/postgres-subfunction-return-error-tp5772407p5772408.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | jonathansfl | 2013-09-25 23:33:21 | Re: postgres subfunction return error |
Previous Message | jonathansfl | 2013-09-25 23:11:17 | postgres subfunction return error |