pl/pgsql errors

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: pl/pgsql errors
Date: 2003-03-03 11:32:51
Message-ID: 3E633D63.7050406@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi

create function....
declare
some_field integer;
begin
some_field=1;
insert into some_table (some_field) values (some_field);
end;

When we try to execute such function, we get:
"ERROR: parser: parse error at or near "$1" at character..."
Well, example above is clear enough to find, that I declared field with
the same name as in a table. I lost a lot of time trying to find mistake
inside long functions until I remembered, what this strange error mean.

Would it be difficult to add special ERROR for this case? It annoyed me
so many times...

Regards,
Tomasz Myrta

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tambet Matiisen 2003-03-03 11:45:53 Re: pl/pgsql errors
Previous Message Matt Gerginski 2003-03-03 10:59:06 complex query