如何在 PostgreSQL 中动态创建数组?
考虑一下,例如:
CREATE OR REPLACE FUNCTION fun( )
RETURNS SETOF void AS
$BODY$
DECLARE
i numeric;
BEGIN
FOR i in 1..10 LOOP
//I have to create an array as
arr1[] ,arr2[] ... based on length
END LOOP;
END;
$BODY$
LANGUAGE plpgsql