Re: Need query

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Need query
Дата
Msg-id efdb82b5-5981-10bc-c087-af73282b9bfc@gmx.net
обсуждение исходный текст
Ответ на Re: Need query  (Caetano Traina Junior <caetano@icmc.usp.br>)
Список pgsql-admin
Caetano Traina Junior schrieb am 18.07.2021 um 15:19:>
>> Em sáb., 17 de jul. de 2021 às 05:33, Thomas Kellerer <shammat@gmx.net <mailto:shammat@gmx.net>> escreveu:
>>     And before you ask: it's not really possible to make this dynamic, so that the number
>>     of columns "automagically" increases when you have more fruits. One fundamental
>>     restriction of the SQL language is that the number and types of all columns
>>     must be known to the database when the query is parsed. It can't change
>>     the columns as a result of the query itself.

> Nonetheless, it is always possible to write a dynamic SQL (and best
> yet, inside a plpgsql function) to "automagically handle more
> fruits..."

Even if you create a function that uses dynamic SQL, you still have to
specify each output column "manually" when calling the function.
So that doesn't really buy you anything.






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

Предыдущее
От: Caetano Traina Junior
Дата:
Сообщение: Re: Need query
Следующее
От: satish v
Дата:
Сообщение: Handling Huge wal files