Is there a type like a growable array, similar Vector at Java language in postgreSQL?

From: "Dongsoo Yoon" <dsyoon(at)metasoftworks(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Is there a type like a growable array, similar Vector at Java language in postgreSQL?
Date: 2005-07-22 06:30:22
Message-ID: 000a01c58e86$d63cae30$6a0aa8c0@notebook04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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;

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dongsoo Yoon 2005-07-22 09:24:03 Error when using array variable
Previous Message Ricky Sutanto 2005-07-22 03:13:12 Counting Row