In Oracle, there is a type like a growable array, similar Vector at Java language. In postgreSQL, is there any type like bellow type?
--------------------------------------------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE test( p_size in number ,p_proccode out varchar2 ,p_procmesg out varchar2 ) IS
v_count
number default 0;
v_dayIndex number default 0; v_size number default 0; type tb_NumTable is table of number(2) index by binary_integer;------------>like a growable array t_modifiedTimes tb_NumTable;----------------------------------------------->declare a variable using above defined type. .... BEGIN
....
v_size := nvl(p_size, 0);
for v_count in 1..v_size loop
v_dayIndex := v_dayIndex + 1;
t_modifiedTimes[v_dayIndex ] := v_count;
end loop; ....
p_proccode := 0; p_procmesg := 'OK'; EXCEPTION WHEN OTHERS THEN p_proccode := SQLCODE; p_procmesg := SUBSTR(SQLERRM, 1, 255); end test;
|
- [SQL] Is there a type like a growable array, similar Vector... Dongsoo Yoon
- Re: [SQL] Is there a type like a growable array, simil... Richard Huxton