Re: Like to RETURN SQL results set

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Like to RETURN SQL results set
Дата
Msg-id hxq6kue5366iodbhhpzlfhb67ppd4s3twt43dwckelnmloul4c@j6u3hsbf4pah
обсуждение исходный текст
Ответ на Re: Like to RETURN SQL results set  (M Sarwar <sarwarmd02@outlook.com>)
Ответы Re: Like to RETURN SQL results set
Список pgsql-admin
On 2024-03-28 23:27 +0100, M Sarwar wrote:
> Numbers of returning columns will vary  dynamically.  Based on that
> SELECT * FROM func() AS (c1 integer, c2 text) is not applicable in my
> case.

Dynamic table structures are hard to do in SQL, one of the reasons why
document databases and the NoSQL movement exist.  So why use crosstab
when it doesn't fit your use case?  Can you achieve the same with a view
or function that returns jsonb like it has been suggested[1] to you
before?  Does the query even have to be implemented inside the database?

[1] https://www.postgresql.org/message-id/CAJJx%2BiUFyTAN9F-C7xBx0sunr08aPvF_EnkGiHm7SP2mhakpqQ%40mail.gmail.com

-- 
Erik



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

Предыдущее
От: M Sarwar
Дата:
Сообщение: Re: Like to RETURN SQL results set
Следующее
От: James Pang
Дата:
Сообщение: [MASSMAIL]cached plan must not change result type