Re: smallserial / serial2

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Mike Pultz <mike(at)mikepultz(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: smallserial / serial2
Date: 2011-04-25 13:07:14
Message-ID: BANLkTimqxuc59ExOEnj9gTjk=kbaj0ZnpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 21, 2011 at 11:06 AM, Mike Pultz <mike(at)mikepultz(dot)com> wrote:
> And since serial4 and serial8 are simply pseudo-types- effectively there for
> convenience, I’d argue that it should simply be there for completeness- just
> because it may be less used, doesn’t mean it shouldn’t be convenient?

Right now, smallint is a bit like an unwanted stepchild in the
PostgreSQL type system. In addition to the problem you hit here,
there are various situations where using smallint requires casts in
cases where int4 or int8 would not. Ken Rosensteel even talked about
this being an obstacle to Oracle to PostgreSQL migrations, in his talk
at PG East (see his slides for details).

Generally, I think this is a bad thing. We should be trying to put
all types on equal footing, rather than artificially privilege some
over others. Unfortunately, this is easier said than done, but I
don't think that's a reason to give up trying.

So a tentative +1 from me on supporting this.

You might want to review:

http://wiki.postgresql.org/wiki/Submitting_a_Patch

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-25 13:17:53 branching for 9.2devel
Previous Message Robert Haas 2011-04-25 12:53:37 Re: make check in contrib