1
我想初始化一個數組array_entries。嘗試array_fill作爲array_fill(0,array_entries)但dint工作。如何初始化一個循環內的postgres中的數組
create or replace function vin_temp_test1(k date,x varchar) RETURNS float AS $$
declare
array_entries int [];
curs4 CURSOR FOR select * from temp_table;
record_type1 record;
fetch curs4 into record_type1;
exit when not found;
loop
-- trying to intialize the array array_entries here
loop
--filling the array inside this loop.
end loop;
end loop;
實際上我沒有想要數組,因爲它是在declare節之後。我的意思是一個沒有數值的空數組。 – user2569524