Re: Dumb question about serial's upper limit - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: Dumb question about serial's upper limit
Date
Msg-id 20051011233026.GP23883@pervasive.com
Whole thread Raw
In response to Re: Dumb question about serial's upper limit  ("Dann Corbit" <DCorbit@connx.com>)
List pgsql-general
On Mon, Oct 10, 2005 at 11:52:40PM -0700, Dann Corbit wrote:
> How about something like:
>
> CREATE DOMAIN unsigned_small AS smallint check (VALUE >= 0)
>
> CREATE DOMAIN unsigned_int AS integer check (VALUE >= 0)
>
> CREATE DOMAIN unsigned_big AS bigint check (VALUE >= 0)
>
> The objection might be that we lose one bit of field width.
> But the extra safety is probably worth it if you really need unsigned
> and want to avoid ambiguity.

Certainly. But I was more interested in the space. :P
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: PostgreSQL's bug tracker
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Dumb question about serial's upper limit