I need to find a way to dump key/value pairs of PL/pgSQL function input parameters:
CREATE OR REPLACE FUNCTION _test(A text, B text)
...
raise info 'Params dump: %', _x;
...
when executed:
select _text('HELLO', 'WORLD');
the function raises info as follows:
'A = HELLO, B = WORLD'
Is there a way to dump input parameter key/value pairs into a variable?
EXECUTEand theEXECUTEd statement can't reference PL/PgSQL variables so that won't work. There is no way to get the parameters as aRECORD. It wouldn't make sense to get them as anARRAYbecause the arguments might be of differing parameter types.