From: | Tomasz Myrta <jasiek(at)klaster(dot)net> |
---|---|
To: | Tambet Matiisen <t(dot)matiisen(at)aprote(dot)ee> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: pl/pgsql errors |
Date: | 2003-03-03 12:32:54 |
Message-ID: | 3E634B76.60308@klaster.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> Probably some_field was declared as alias for $1. I think plpgsql does
> simple find&replace for aliases, that's how $1 appeared in wrong place. I
> usually prefix all procedure parameters with p_, this guards me against this
> situation and also makes code more clear.
>
> Tambet
No, no no
I always get this error where table column name equals to declared field
name. I've just made a special test to check if it has something to
aliases. Function below doesn't use any arguments nor aliases:
create or replace function test() returns integer as'
declare
id_miasta integer;
begin
insert into miasta(id_miasta,nazwa) values (id_miasta,null);
return 1;
end;
' language 'plpgsql';
Error message is the same. I know this error very well, I know how to
avoid it, but I'm just asking if it is difficult to change strange error
message.
Regards,
Tomasz Myrta
From | Date | Subject | |
---|---|---|---|
Next Message | Tomasz Myrta | 2003-03-03 12:41:23 | Re: HardCORE QUERY HELP!!! |
Previous Message | Oliver Elphick | 2003-03-03 12:32:44 | Re: two dates |