Re: auto-increment field : in a simple way - Mailing list pgsql-general

From Vineet Deodhar
Subject Re: auto-increment field : in a simple way
Date
Msg-id CAP5=7ookywwjkRZfv3UrpericdGYQPd_jVhntQv-BhsdWsRzmg@mail.gmail.com
Whole thread Raw
In response to Re: auto-increment field : in a simple way  (Scott Marlowe <scott.marlowe@gmail.com>)
Responses Re: auto-increment field : in a simple way  (JC de Villa <jc.devilla@gmail.com>)
Re: auto-increment field : in a simple way  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-general
On Thu, Oct 11, 2012 at 12:56 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:

Can't you just add this to your create table:


CREATE TABLE tablename (
   colname SERIAL
, check (colname>0 and colname < 32768));
);



With this constraint, whether the storage space requirement would reduce?
OR
Is it just for validation of data?

--- Vineet

pgsql-general by date:

Previous
From: Vineet Deodhar
Date:
Subject: Re: moving from MySQL to pgsql
Next
From: Condor
Date:
Subject: How to raise index points when equal and like is used with gist?