Re: postgres subfunction return error

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: postgres subfunction return error
Дата
Msg-id 1380151167590-5772408.post@n5.nabble.com
обсуждение исходный текст
Ответ на postgres subfunction return error  (jonathansfl <jonathanbrinkman@yahoo.com>)
Ответы Re: postgres subfunction return error
Список 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 по дате отправления:

Предыдущее
От: jonathansfl
Дата:
Сообщение: postgres subfunction return error
Следующее
От: jonathansfl
Дата:
Сообщение: Re: postgres subfunction return error