From: | The Hermit Hacker <scrappy(at)hub(dot)org> |
---|---|
To: | Goran Thyni <goran(at)bs1(dot)bildbasen(dot)kiruna(dot)se> |
Cc: | "D(dot) Dante Lorenso" <dlorenso(at)afai(dot)com>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] AUTO_INCREMENT suggestion |
Date: | 1998-03-06 13:31:17 |
Message-ID: | Pine.NEB.3.95.980306083041.26524E-100000@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 6 Mar 1998, Goran Thyni wrote:
> D. Dante Lorenso wrote:
> >
> > To aid those of us that don't want to use sequences, can we add a
> > feature to 6.4 that allows the use of an AUTO_INCREMENT statement
> > when defining tables? MySQL does this, and I like it. It resembles
> > the Autonumber feature in Access as well.
> >
> > create table tblFirm (
> > FirmID int PRIMARY KEY AUTO_INCREMENT,
> > FirmTypeID int,
> > FirmName varchar(64) NOT NULL,
> > FirmAlpha char(20) NOT NULL UNIQUE,
> > FirmURL varchar(64),
> > FirmEmail varchar(64)
> > );
> >
> > Just yet another suggestion.
> >
>
> Informix calls something like this SERIAL type, like:
>
> create table tblFirm (
> FirmID SERIAL PRIMARY KEY,
> FirmTypeID int,
> FirmName varchar(64) NOT NULL,
> FirmAlpha char(20) NOT NULL UNIQUE,
> FirmURL varchar(64),
> FirmEmail varchar(64)
> );
>
> Don't know if that is standrd or extension.
>
> We use "CREATE SEQUENCE" to do this is PgSQL.
Just like PRIMARY KEY pretty much masks a 'CREATE UNIQUE INDEX',
why not SERIAL/AUTO_INCREMENT masking a "CREATE SEQUENCE"?
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1998-03-06 13:33:25 | Re: [HACKERS] domain feature - details |
Previous Message | Zeugswetter Andreas | 1998-03-06 13:06:25 | AW: [HACKERS] Re: [PATCHES] Changes to sequence.c |