Re: [HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Pavel Stehule
2008/10/29 Tom Lane <[EMAIL PROTECTED]>: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> I understand. So every smallint should be call with casting? > > A long time ago we tried to make small integer literals be interpreted > as int2 initially, instead of int4, and the attempt failed rather > spe

Re: [HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > I understand. So every smallint should be call with casting? A long time ago we tried to make small integer literals be interpreted as int2 initially, instead of int4, and the attempt failed rather spectacularly. (It broke most of the regression tests

Re: [HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Pavel Stehule
2008/10/29 Tom Lane <[EMAIL PROTECTED]>: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> I am not sure, it's probably bug. > >> postgres=# create function t1(smallint) returns smallint as $$select >> $1$$ language sql; >> CREATE FUNCTION >> postgres=# select t1(10); >> ERROR: function t1(integer)

Re: [HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > I am not sure, it's probably bug. > postgres=# create function t1(smallint) returns smallint as $$select > $1$$ language sql; > CREATE FUNCTION > postgres=# select t1(10); > ERROR: function t1(integer) does not exist That's not "unknown to smallint",

[HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Pavel Stehule
Hello I am not sure, it's probably bug. postgres=# create function t1(smallint) returns smallint as $$select $1$$ language sql; CREATE FUNCTION postgres=# create function t2(bigint) returns bigint as $$select $1$$ language sql; CREATE FUNCTION postgres=# select t1(10); ERROR: function t1(integer