Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 144264763C3 for ; Fri, 27 Sep 2002 16:15:15 -0400 (EDT) Received: from post.webmailer.de (natwar.webmailer.de [192.67.198.70]) by postgresql.org (Postfix) with ESMTP id 74F764761D7 for ; Fri, 27 Sep 2002 16:15:13 -0400 (EDT) Received: from ianb.local (pD9EB0B84.dip.t-dialin.net [217.235.11.132]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id WAA16687; Fri, 27 Sep 2002 22:15:07 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-1" From: Ian Barwick To: Gustavo Tadao Okida , pgsql-sql@postgresql.org Subject: Re: PL/pgsql Date: Fri, 27 Sep 2002 22:16:28 +0200 X-Mailer: KMail [version 1.4] References: <3D9210D3.9030508@netscape.net> In-Reply-To: <3D9210D3.9030508@netscape.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209272216.28633.barwick@gmx.net> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/392 X-Sequence-Number: 9669 On Wednesday 25 September 2002 21:38, Gustavo Tadao Okida wrote: (...) > After this, I wrote a function with > pgaccess : > > Name: spi_novo_parametro paramters: > returns: char language: plpgsql > > DECLARE > val INTEGER :=3D1; > 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 (...) I don't know PgAccess, but possibly your function is incorrect and the errors produced on execution are confusing PgAccess? Try defining and executing the function in the psql command line client. This may give you a better idea of what is happening. I would also strongly recommend replacing the double quotes with pairs of single quotes, e.g. ''OK'' instead of "OK" . Ian Barwick barwick@gmx.net