Bug #877: numbers are no longer recognized as smallints - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #877: numbers are no longer recognized as smallints
Date
Msg-id 20030119173621.31BB5475461@postgresql.org
Whole thread Raw
List pgsql-bugs
Denis N. Stepanov (D.N.Stepanov@inp.nsk.su) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
numbers are no longer recognized as smallints

Long Description
I have bunch of functions (doesn't matter of which language) which take parameters as 'smallint's. I used to pass
parametersinto them as is, i.e. plain numbers without explicit typecasting. But while trying to upgrade from PostgreSQL
7.2.3to 7.3.1 I discovered that this no longer works. All function calls now fail convincing me to add explicit
typecasts.I believe this is incorrect since, say, 1 is a correct notation for smallint type and it should NOT require
explicittypecase in each and every place. I tried to find the grounds of such change in 7.3.1 docs but did not succeed.
Pleaselet me know whether this is a bug or I just miss something important here. 

Sample Code
testdasdb=# create function test(smallint) returns integer as 'select 0' language 'sql';
CREATE FUNCTION
testdasdb=# select test(1);
ERROR:  Function test(integer) does not exist
        Unable to identify a function that satisfies the given argument types
        You may need to add explicit typecasts


No file was uploaded with this report

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: inet/cidr indexes almost not used
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #878: different format of float values in 7.2.and 7.3