Skip site navigation (1) Skip section navigation (2)

Re: some problem with casting unknown to smallint

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "postgres hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: some problem with casting unknown to smallint
Date: 2008-10-29 12:52:41
Message-ID: 162867790810290552l7c18613n8ae67c0413a18a8c@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
2008/10/29 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> 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, IIRC, in ways
> that suggested that many client applications would have problems too.)
> Perhaps PG's type system has matured to the point where it'd work better
> now, but I'm not really interested in trying it.  I don't see very much
> point in declaring functions to take smallint rather than int anyway...

I found this question on one czech it specialized site. It's mostly
beginner's problem.

regards
Pavel Stehule


>
>                        regards, tom lane
>

In response to

pgsql-hackers by date

Next:From: Greg SmithDate: 2008-10-29 13:05:21
Subject: Re: Decreasing WAL size effects
Previous:From: Tom LaneDate: 2008-10-29 12:44:07
Subject: Re: some problem with casting unknown to smallint

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group