Trying to append an array to an array does not seem to work.
DO
$do$
DECLARE
COUNTER INTEGER = 0;
CRNS bigint [];
TMPS bigint [];
BEGIN
WHILE COUNTER < 2 LOOP
TMPS := ARRAY(select plain_crn from call_records where timestamp=1467981702966);
array_append(CRNS,TMPS);
RAISE NOTICE '%',CRNS;
COUNTER := COUNTER + 1;
END LOOP;
END
$do$;
Seem to get the following error
ERROR: function array_append(bigint[], bigint[]) does not exist
LINE 1: SELECT array_append(CRNS,TMPS)
^