Postgres 11 procedures and result sets

Поиск
Список
Период
Сортировка
От Jan Kohnert
Тема Postgres 11 procedures and result sets
Дата
Msg-id 10467048.Hd5HFnr8GS@kohni-mobil
обсуждение исходный текст
Ответы Re: Postgres 11 procedures and result sets  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello List,

I have a question regarding the new stored procedures in Postgres 11 (I tested 
beta4):

I'd like to know if it is somehow possible to get a (or possibly more) result 
set from selects within the SP, as it is possible in MariaDB, MySQL, or SQL 
Server. 

What I found until now is to use inout-Parms. Then I have to define all 
columns in the select as inout-Params, but then I get only one line back, 
regardless how many lines >0 have been selected.

I could also define an inout refcursor param, and parse that one, but that 
would make the new SP identical to the well known functions returning a 
refcursor. And when I use that approach, I have an additional step in Qt-Code 
for example, since I have to exec the SP, then parse to the refcursor result, 
exec the fetch and then parse the cursor output I'm interested in.

Did I miss something? 

Thanks in advance!

-- 
MfG Jan




В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: CREATE TABLE AS SELECT hangs
Следующее
От: derek
Дата:
Сообщение: Re: CREATE TABLE AS SELECT hangs