I'm trying to maintain a Php application with a PostgreSQL database. At one point, a stored procedure is called, lets say function_x
and inside function_x
, function_y
is called; function_y
is passed a variable named parameter_1
, and the definition of parameter_1 is:
parameter_1 numeric[][3] := {};
I'm trying to do a select function_y directly on the command line (or pgadmin) but I'm having problems passing an empty array into the function. according to the docs you have to use variadic
but so I tried:
select function_y(581, 'CPN-00000000001-0000', 'TPN-00000000001-0001', 100, 2013, variadic arr := array[]);
But I got this error:
ERROR: cannot determine type of empty array
I tried different approaches but nothing works. How can I pass a multidimensional array as a parameter at a query?