=?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