Bug #877: numbers are no longer recognized as smallints

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #877: numbers are no longer recognized as smallints
Дата
Msg-id 20030119173621.31BB5475461@postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: inet/cidr indexes almost not used
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #878: different format of float values in 7.2.and 7.3