I need to append an item to existed array in postgresql. I wrote this code (plpgsql function):
perform array_append (arrayA::integer[],id);
Since it didn't work I tried:
raise notice '%', arrayA;
perform array_append (arrayA::integer[],id);
raise notice '%', arrayA;
It gives:
NOTICE: <NULL>
NOTICE: <NULL>
Why the array isn't updated?
v_arraya := arraya || idorv_array := array_append(arraya, id);(that assumes that the variablearrrayais indeed an array