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

[EMAIL PROTECTED]
www.ipinc.com



Reply via email to