ERROR: cannot pass more than 100 arguments to a function

Поиск
Список
Период
Сортировка
От Ján Máté
Тема ERROR: cannot pass more than 100 arguments to a function
Дата
Msg-id E0EF3255-BC7C-4368-84CD-DF75325901B9@inf-it.com
обсуждение исходный текст
Ответы Re: ERROR: cannot pass more than 100 arguments to a function  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ERROR: cannot pass more than 100 arguments to a function  (raf <raf@raf.org>)
Список pgsql-bugs
Hi PostgreSQL,

I noticed an interesting problem with the default max. number of function arguments, especially related to JSON processing.

I understand that there is a need to limit the max. number of arguments for functions, but the current limit (100) is simply too restrictive for tables with large number of columns (according to my findings it is >250 depending on column types).

A simple example:

- I have a table with 70 columns

- I want to select the most simple JSON output from that table:

SELECT
json_build_object(
'a', "col1",
'b', "col2",
'c', "col2",
...
)
FROM "schema"."table";

- with the 100 arguments limit I can select only 50 columns - 50 x (jsonKeyName + ColumnName) = 100 arguments

- if the limit of columns in the table is >250, why I cannot select at least 250 columns using the built-in json_build_object(...) function?


Please someone consider to increase the default limit from 100 to at least 500 (2x max. number of columns) for json_build_object(...) and other similar JSON functions.


Kind regards,


JM

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16348: Memory leak when parsing config
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: cannot pass more than 100 arguments to a function