Re: postgres subfunction return error - Mailing list pgsql-sql

From David Johnston
Subject Re: postgres subfunction return error
Date
Msg-id 1380151167590-5772408.post@n5.nabble.com
Whole thread Raw
In response to postgres subfunction return error  (jonathansfl <jonathanbrinkman@yahoo.com>)
Responses Re: postgres subfunction return error  (jonathansfl <jonathanbrinkman@yahoo.com>)
List 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.



pgsql-sql by date:

Previous
From: jonathansfl
Date:
Subject: postgres subfunction return error
Next
From: jonathansfl
Date:
Subject: Re: postgres subfunction return error