Bug #877: numbers are no longer recognized as smallints

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #877: numbers are no longer recognized as smallints
Date: 2003-01-19 17:36:21
Message-ID: 20030119173621.31BB5475461@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Denis N. Stepanov (D(dot)N(dot)Stepanov(at)inp(dot)nsk(dot)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 parameters into them as is, i.e. plain numbers without explicit typecasting. But while trying to upgrade from PostgreSQL 7.2.3 to 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 explicit typecase in each and every place. I tried to find the grounds of such change in 7.3.1 docs but did not succeed. Please let 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

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2003-01-20 08:13:38 Bug #878: different format of float values in 7.2.and 7.3
Previous Message Tom Lane 2003-01-19 16:10:16 Re: inet/cidr indexes almost not used