Re: ERROR: cannot pass more than 100 arguments to a function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: cannot pass more than 100 arguments to a function
Дата
Msg-id 23664.1586381648@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ERROR: cannot pass more than 100 arguments to a function  (Ján Máté <jan.mate@inf-it.com>)
Список pgsql-bugs
=?utf-8?B?SsOhbiBNw6F0w6k=?= <jan.mate@inf-it.com> writes:
> I understand that there is a need to limit the max. number of arguments for functions, but the current limit (100) is
simplytoo restrictive for tables with large number of columns (according to my findings it is >250 depending on column
types).

I'd suggest using one of the array- or aggregation-based approaches,
rather than insisting on writing it out with some hundreds of distinct
arguments.  Any specific function-argument-count limit we might pick
would be too small for somebody, but those other methods can scale
much further.  For example,

SELECT json_object(
array['a', 'col1',
      'b', 'col2',
      'c', 'col3']);
                json_object
--------------------------------------------
 {"a" : "col1", "b" : "col2", "c" : "col3"}
(1 row)

            regards, tom lane



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

Предыдущее
От: Ján Máté
Дата:
Сообщение: ERROR: cannot pass more than 100 arguments to a function
Следующее
От: raf
Дата:
Сообщение: Re: ERROR: cannot pass more than 100 arguments to a function