This statement is throwing error:
FOR _i2 IN 1 .. array_upper(p_extra_info, 1) LOOP
....
SELECT currval('ad_extra_info_id_seq') INTO _new_extra_info_ids[_i2];
....
END LOOP;
ERROR: syntax error at or near "["
LINE 179: ...rrval('ad_extra_info_id_seq') INTO _new_extra_info_ids[_i2];
^
********** Error **********
ERROR: syntax error at or near "["
SQL state: 42601
Character: 7907
Variable _new_extra_info_ids is declared like this: _new_extra_info_ids integer[];
Do you know what is wrong?
selectinside a loop usually rings an alarm bell for me.