Strange error with Pl/PgSQL
От | Laurent HERVE |
---|---|
Тема | Strange error with Pl/PgSQL |
Дата | |
Msg-id | 3A1FB9E5.EC0D227A@infonie.fr обсуждение исходный текст |
Ответы |
Re: Strange error with Pl/PgSQL
|
Список | 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.
В списке pgsql-novice по дате отправления: