Re: [HACKERS] AUTO_INCREMENT suggestion

From: Mattias Kregert <matti(at)algonet(dot)se>
To: ocie(at)paracel(dot)com
Cc: Goran Thyni <goran(at)bs1(dot)bildbasen(dot)kiruna(dot)se>, dlorenso(at)afai(dot)com, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] AUTO_INCREMENT suggestion
Date: 1998-03-09 12:08:10
Message-ID: 3503DBAA.1718507A@algonet.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ocie(at)paracel(dot)com wrote:
> > > the Autonumber feature in Access as well.
> > >
> > > create table tblFirm (
> > > FirmID int PRIMARY KEY AUTO_INCREMENT,
>
> > 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.
>
> Sybase calls this an identity. I don't think there is a standard name
> for this, sigh.
>
> Ocie

How about adding all those keywords?
AUTONUMBER, IDENTITY, AUTO_INCREMENT, SERIAL

Then, anybody could switch to PostgreSQL without having to relearn
this.

Would it be possible to have a "compatability" variable, like this?
psql=> set sqlmode to {STRICT_ANSI|POSTGRESQL|ORACLE ...}
so that ppl can set it to STRICT when they want to write portable
SQL, and PGSQL when they want all these nice features?

/* m */

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mattias Kregert 1998-03-09 12:22:43 Re: [HACKERS] Execution time
Previous Message Zeugswetter Andreas 1998-03-09 11:43:29 AW: [HACKERS] newoid in invapi.c