Re: auto-increment field : in a simple way

From: Vineet Deodhar <vineet(dot)deodhar(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: auto-increment field : in a simple way
Date: 2012-10-11 09:11:43
Message-ID: CAP5=7ookywwjkRZfv3UrpericdGYQPd_jVhntQv-BhsdWsRzmg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 11, 2012 at 12:56 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Condor 2012-10-11 09:23:40 How to raise index points when equal and like is used with gist ?
Previous Message Vineet Deodhar 2012-10-11 09:07:23 Re: moving from MySQL to pgsql