I have a function written in plpythonu.
CREATE OR REPLACE FUNCTION temp(t_x integer[])
RETURNS void AS
$BODY$
.
.
.
x=plpy.execute("""select array_to_string(select id from A where id=any(array%s) ), ',')"""%t_x)
On some cases when t_x is empty I get an error:
ERROR: cannot determine type of empty array
How do I fix it?