Strange error with Pl/PgSQL

From: Laurent HERVE <laurent_herve(at)infonie(dot)fr>
To: pgsql-novice(at)postgresql(dot)org
Subject: Strange error with Pl/PgSQL
Date: 2000-11-25 13:08:54
Message-ID: 3A1FB9E5.EC0D227A@infonie.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I wrote a little test function in pl/pgsql :

create function TEST (char(5),char(6),char(11))
returns boolean
as '
DECLARE
bank alias for $1;
guichet alias for $2;
compte alias for $3;
cmpt record;
BEGIN
raise notice ''Banque %'',bank;
select into cmpt * from compte;
-- where code_banque=bank
-- and numero_guichet=guichet
-- and numero_compte=compte;
return ''t'';
END;'
LANGUAGE 'plpgsql';

When using this function I get the following error :
z_money=> select test('99999','00001','1');
ERROR: parser: parse error at or near "$1"

It doesn't happen with another table than ''compte''. It looks like
there is something wrong with table ''compte'', but I still can do
selects, inserts, etc... with psql.
If I suppress parameters, the error message does not happen.

So what's wrong ? How can I found more information ?

Thanks for advance.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2000-11-25 16:50:46 Re: Strange error with Pl/PgSQL
Previous Message Mike Castle 2000-11-24 23:20:53 Re: tinterval or interval