Re: Postgresql 7.3.2-3 and 7.3.3-4 freeze - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Postgresql 7.3.2-3 and 7.3.3-4 freeze
Date
Msg-id 5182.1058462450@sss.pgh.pa.us
Whole thread Raw
In response to Postgresql 7.3.2-3 and 7.3.3-4 freeze  ("Admin Gaston" <admin@intergamesclub.com>)
List pgsql-bugs
"Admin Gaston" <admin@intergamesclub.com> writes:
> CREATE FUNCTION alta_usuario(varchar, varchar, varchar, varchar, varchar, v=
> archar, smallint, smallint, date, smallint, varchar, varchar, smallint, var=
> char, varchar, varchar, varchar, varchar, smallint, varchar, smallint, varc=
> har) RETURNS int4 AS '
> ...
> select alta_usuario('cerito','a','a','a','a@a.com','AR',1,1,'1981-07-24',1,=
> 'a','a',1,'-3','a','a','a','a', 3, '', 4, '');

This function declaration does not match the arguments you are passing:
the integer constants are int4 which does not implicitly convert to
int2.  So you need to declare the function to take integer arguments,
or else explicitly cast all the integer constants to smallint.

The reason it seems to freeze up is a known bug: when there's no match
to a function call, parse_func.c takes time proportional to
2-to-the-number-of-arguments to decide it can't find a match.  (If you
waited long enough, you'd get a "no such function" complaint.)  There is
a fix for that in CVS; it will appear in 7.3.4.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Richard Hall"
Date:
Subject: Re: Postgresql 7.3.2-3 and 7.3.3-4 freeze
Next
From: Tom Lane
Date:
Subject: Re: [INTERFACES] PL/PGSQL stat failed on file '$libdir/plpgsql'