Re: Prefered Types

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Зотов Роман <zotov(at)oe-it(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prefered Types
Date: 2011-05-07 21:24:52
Message-ID: 1304803492.15989.23.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On fre, 2011-05-06 at 18:38 -0300, Alvaro Herrera wrote:
> I remember that one of the problems put forth against this idea was
> that stuff like int2+int2 which currently returns int2 would have to
> be changed to return int4, otherwise it risks overflow which it
> currently doesn't (not because the operator would change, but rather
> because some expressions would be lexed differently). And so on with
> other operators. I am not sure how severe this problem is for users
> in practice -- my uneducated guess is that mostly they will not care
> about such changes.

Modulo backward compatibility concerns, I don't think it would
necessarily be wrong if int2+int2 returned int4. sum(int2) returns
int8, and no one seems bothered by that.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-05-07 21:26:56 Re: Why not install pgstattuple by default?
Previous Message Tomasz Chmielewski 2011-05-07 21:19:16 Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now?