pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: Tambet Matiisen <t.matiisen@aprote.ee>
Cc: pgsql-sql@postgresql.org
Subject: Re: pl/pgsql errors
Date: Mon, 03 Mar 2003 13:32:54 +0100
Message-ID: <3E634B76.60308@klaster.net> (raw)
References: <3E633D63.7050406@klaster.net>
	<000701c2e17a$71ebbe50$0e01a8c0@aprote.com>

> 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




view thread (3+ messages)

Message-ID: <3E634B76.60308@klaster.net>
Permalink:  ../3E634B76.60308@klaster.net/
Also on:    postgresql.org/message-id/3E634B76.60308@klaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasiek@klaster.net, t.matiisen@aprote.ee
  Subject: Re: pl/pgsql errors
  In-Reply-To: <3E634B76.60308@klaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox