Received: from tidal.ipinc.com (tidal.ipinc.com [199.245.188.85]) by hub.org (8.10.1/8.10.1) with ESMTP id e77K0MG11830 for ; Mon, 7 Aug 2000 16:00:22 -0400 (EDT) Received: from ipinc.com (jliang.ipinc.com [199.245.188.130]) by tidal.ipinc.com (8.9.3/8.9.3) with ESMTP id NAA62512 for ; Mon, 7 Aug 2000 13:00:16 -0700 (PDT) (envelope-from jliang@ipinc.com) Message-ID: <398F1543.39B7F6A8@ipinc.com> Date: Mon, 07 Aug 2000 13:00:04 -0700 From: Jie Liang Organization: ipinc.com X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.4-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: PL/pgSQL Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200008/59 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@ipinc.com www.ipinc.com