Re: How can I get a column INT4 to be UNSIGNED ?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I get a column INT4 to be UNSIGNED ?
Date: 2003-04-15 21:24:54
Message-ID: 200304152124.h3FLOsm09942@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron Johnson wrote:
> On Fri, 2003-04-11 at 16:09, Dennis Gearon wrote:
> > If he wants the full range of an INT4 unsigned, he needs to go to INT8 with the
> > constraint you mentioned. The underlying col type of INT4 only supports HALF of
> > the range of an INT4 unsigned, in the positive domain, that is.
>
> When domains allow CHECK constraints, that would be simplified, wouldn't
> it?

I thought we did support it:

test=> CREATE DOMAIN unsigned AS int4 CHECK ( VALUE > 0);
CREATE DOMAIN

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paesold 2003-04-15 21:51:00 Re: Are we losing momentum?
Previous Message Medi Montaseri 2003-04-15 20:48:15 Re: Postgres Compare