<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body
p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#ffffff"
text="#000000">
<p>Tested in 8.2 and 9.0.1</p>
In plpgsql, if you have a function parameter and a variable of the
same name, it ignores the value passed in and initializes the
variable to null.<br>
The correct action, IMO, would be to raise an error.<br>
<br>
create or replace function test1(x int) returns int as<br>
$$<br>
declare x int;<br>
begin<br>
return x;<br>
end;<br>
$$ language 'plpgsql';<br>
<br>
Thanks<br>
Sim<br>
</body>
</html>