Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 55D3B476135 for ; Wed, 25 Sep 2002 15:39:32 -0400 (EDT) Received: from imo-r02.mx.aol.com (imo-r02.mx.aol.com [152.163.225.98]) by postgresql.org (Postfix) with ESMTP id A1C7947611A for ; Wed, 25 Sep 2002 15:39:31 -0400 (EDT) Received: from Gtadaodev@netscape.net by imo-r02.mx.aol.com (mail_out_v34.10.) id k.58.474a288 (16238) for ; Wed, 25 Sep 2002 15:39:26 -0400 (EDT) Received: from netscape.net ([200.207.213.77]) by air-in03.mx.aol.com (v88.20) with ESMTP id MAILININ32-0925153925; Wed, 25 Sep 2002 15:39:25 -0400 Message-ID: <3D9210D3.9030508@netscape.net> Date: Wed, 25 Sep 2002 16:38:59 -0300 From: Gustavo Tadao Okida User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: PL/pgsql Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailer: Unknown (No Version) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/369 X-Sequence-Number: 9646 Hi, I'm a new PostgreSql user but I have some experience in Oracle. So I decided to use PL/pgsql to build my procedure (functions). I create an database called MyDatabase and add this language into it with: createlang plpgsql MyDatabase. After this, I wrote a function with pgaccess : Name: spi_novo_parametro paramters: returns: char language: plpgsql DECLARE val INTEGER :=1; BEGIN insert into identificador_pri values(1, "OK"); RETURN "OK"; END; It was OK when I saved it in pgaccess front end. When I tested it, by query tab, writing select spi_novo_parametro();, it return me this message: Error: can't read "PgAcVar(mw,.pgaw:22,nrecs)": no such element in array and the stack is: Error: can't read "PgAcVar(mw,$wn,nrecs)": no such element in array while executing "For {set row 0} {$row<$PgAcVar(mw,$wn,nrecs)} {incr row}{ if {[lindex $PgAcVar(mw,$wn,nrecs) $row]>$y} break }" (procedure "Tables::canvasClick" line 5) invoked from within "Tables::canvasClick .pgaw:22 229 240" (command bound to event) Could you help me? Thanks in advance. Tadao