X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 92CD147580B for ; Mon, 3 Mar 2003 07:33:01 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 49672-08 for ; Mon, 3 Mar 2003 07:33:00 -0500 (EST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id 11D0B4753A1 for ; Mon, 3 Mar 2003 07:33:00 -0500 (EST) Received: from klaster.net (pi147.krakow.cvx.ppp.tpnet.pl [217.99.209.147]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 99F222B880; Mon, 3 Mar 2003 13:31:18 +0100 (CET) Message-ID: <3E634B76.60308@klaster.net> Date: Mon, 03 Mar 2003 13:32:54 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; PL; rv:1.1) Gecko/20020826 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: Tambet Matiisen Cc: pgsql-sql@postgresql.org Subject: Re: pl/pgsql errors References: <3E633D63.7050406@klaster.net> <000701c2e17a$71ebbe50$0e01a8c0@aprote.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/66 X-Sequence-Number: 12106 > 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