> Problem is that 24 is not an int2 -- it's an int4 (generic int type).
> For example:
>
Yes it is ... int2 is a two byte integer, meaning it has a range from
-32768 to +32767. Unless I totally mistaken, 24 falls within that range.
Am I missing something vital to this problem? What you have said seems
incorrect to me.
> joel@joel=# create function hi(int2) returns bool as 'begin return true;
> end;' language 'plpgsql';
> CREATE FUNCTION
> joel@joel=# select hi(42);
> ERROR: Function hi(integer) does not exist
> Unable to identify a function that satisfies the given argument types
> You may need to add explicit typecasts
>
It works fine for me:
test=# create function hi(int2) returns bool as 'begin return true;
test'# end;' language 'plpgsql';
CREATE
test=# select hi(42);
hi
----
t
(1 row)
test=#
What version are you using?
Andy