From: | Jie Liang <jliang(at)ipinc(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | PL/pgSQL |
Date: | 2000-08-07 20:00:04 |
Message-ID: | 398F1543.39B7F6A8@ipinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi, there,
1.
Is anybody know how to declare a explicit cursor in PL/SQL in postgres?
1. I want create a function use PL/pgSQL:
create function foo() returns whatevertype as '
declare
v_asda int2;
cursor is select a,b,c from AAA; -- what is the syntex?
begin
statements
end;
' langauge 'plpgsql';
2. for the record type, can I explicitly define my own record like:
declare
type blah is record(ename text,job text,id int 4);
type blahblah is table of blah index by int4; -- like in
Oracle
......
3. how to define an array in PL/pgSQL declare block and assign it in
execuable block?
like:
declare
ary int[5]; -- in PL/pgSQL maybe is _int;
began
ary[1]:= 3; -- give me error when I run it;
end;
Thanks.
--
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang(at)ipinc(dot)com
www.ipinc.com
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2000-08-08 04:10:08 | Re: Subselect and limit/order? |
Previous Message | Mark Volpe | 2000-08-07 19:57:30 | Re: foreign key take too much time to check |