| От | Tom Lane |
|---|---|
| Тема | Re: PLSQL function calling another function |
| Дата | |
| Msg-id | 16879.1223568487@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | PLSQL function calling another function (<cyw@dls.net>) |
| Список | pgsql-general |
<cyw@dls.net> writes:
> I am trying to figure out how to call one PLSQL function from another, specifically how to access the return values
fromthe callee.
> I made two test functions, A and B. A calls B.
> B returns two values:
> OUT tid integer
> OUT msg character varying
> In caller function A, I do the following:
> SELECT B(1) INTO rec; -- rec declared as a RECORD
This produces a record containing a single composite column (named "b"),
as you would see if you did the same SELECT by hand:
regression=# select b(1);
b
-----------
(100,MSG)
(1 row)
You will get the results you expect if you do something like
select * into rec from b(1);
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера