Re: How to return multiple rows by stored procedure in postgresql

Поиск
Список
Период
Сортировка
От Paul Förster
Тема Re: How to return multiple rows by stored procedure in postgresql
Дата
Msg-id 39B3366A-5C16-4477-9C5C-03D3689179CB@gmail.com
обсуждение исходный текст
Ответ на Re: How to return multiple rows by stored procedure in postgresql  (Naveen Kumar <naveenmcp@gmail.com>)
Ответы Re: How to return multiple rows by stored procedure in postgresql  (Holger Jakobs <holger@jakobs.com>)
Список pgsql-admin
Hi Naveen,

> On 06. Oct, 2020, at 08:15, Naveen Kumar <naveenmcp@gmail.com> wrote:
>
> Thank you for the quick response.
>
> All the examples are talking about functions, not about procedures in PostgreSQL. what i am looking for is how to
returnmultiple rows by calling STORED PROCEDURE in postgreSQL 12 version. 
>
> Thank you
> Naveen

a procedure does by definition not return anything. If you want to return something, use a function.

As for returning multiple rows, use create function ... returns table (columns...)

https://www.postgresql.org/docs/current/sql-createfunction.html
https://www.postgresql.org/docs/current/sql-createprocedure.html

Cheers,
Paul


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

Предыдущее
От: Naveen Kumar
Дата:
Сообщение: How to add partitions to the existing table in PostgreSQL
Следующее
От: Nagaraj Raj
Дата:
Сообщение: Re: How to add partitions to the existing table in PostgreSQL