CREATE OR REPLACE FUNCTION public.reduce_dim( anyarray) RETURNS SETOF anyarray LANGUAGE 'plpgsql'
COST 100 VOLATILE ROWS 1000 AS $BODY$ DECLARE s $1%type; BEGIN IF cardinality ($1::text[]) >0 THEN FOREACH s SLICE 1 IN ARRAY $1 LOOP RETURN NEXT s; END LOOP; END IF; RETURN; END; $BODY$;