Re: PL/pgsql

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Gustavo Tadao Okida <Gtadaodev(at)netscape(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: PL/pgsql
Date: 2002-09-27 20:16:28
Message-ID: 200209272216.28633.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 :=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

(...)

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(at)gmx(dot)net

In response to

  • PL/pgsql at 2002-09-25 19:38:59 from Gustavo Tadao Okida

Browse pgsql-sql by date

  From Date Subject
Next Message Kevin Houle 2002-09-28 03:38:29 Re: Case Sensitive "WHERE" Clauses?
Previous Message GB Clark 2002-09-27 19:56:52 Re: Constraint problems