Re: Like to RETURN SQL results set

Поиск
Список
Период
Сортировка
От M Sarwar
Тема Re: Like to RETURN SQL results set
Дата
Msg-id DM4PR19MB59783D5AC6541B6FBC43E87AD33A2@DM4PR19MB5978.namprd19.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Like to RETURN SQL results set  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-admin
Scott,

I need to work on this to explore this option.
Thanks a lot!
Sarwar


From: Scott Ribe <scott_ribe@elevated-dev.com>
Sent: Thursday, March 28, 2024 11:54 PM
To: M Sarwar <sarwarmd02@outlook.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Like to RETURN SQL results set
 
> On Mar 28, 2024, at 9:39 PM, M Sarwar <sarwarmd02@outlook.com> wrote:
>
> I could not follow JSON part. Do you have any case where I can see JSON is used to solve this type of problem.

To get json back, take any query and wrap it in

'select array_to_json(array_agg(row_to_json(t)))::text from (' || query || ') as t;'


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

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: Like to RETURN SQL results set
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: cached plan must not change result type