Skip site navigation (1) Skip section navigation (2)

Re: Change the behaviour of the SERIAL "Type"

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Dani Oderbolz <oderbolz(at)ecologic(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Change the behaviour of the SERIAL "Type"
Date: 2003-06-27 14:55:19
Message-ID: 1056725718.25229.21.camel@jester (view raw or flat)
Thread:
Lists: pgsql-sql
> Well, why not just use the Sequence?
> Is there really such a performance hit when calling a trigger?
> In Oracle, one usually does such a thing, as there is no such nice 
> workaround
> as SERIAL.
> Hmm, I am still thinking about a special kinf of SERIAL, maybe called
> TRIGGERED_SERIAL which creates a trigger instead of a DEFAULT.

DB2, Firebird, MSSQL? and some others have what they call GENERATOR
support (IDENTITIES fall into this)-- which also happens to be in the
SQL 200N proposals.

Main Features (per proposed spec):
- Not strictly integers (any expression on any datatype)
- Optionally overridable or not -- which is what you're looking for
- Attribute of the column. Not a datatype. This is an alternative for
DEFAULT.


I'm hoping to add IDENTITIES / GENERATOR support along these lines in
7.5, but I've not looked at those other databases to see how close their
implementation matches spec -- whether it will make us compatible with
them or not.

-- 
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

pgsql-sql by date

Next:From: Bruno Wolff IIIDate: 2003-06-27 15:10:25
Subject: Re: Getting all rows even if not a member of any groups
Previous:From: Dani OderbolzDate: 2003-06-27 14:35:36
Subject: Re: Change the behaviour of the SERIAL "Type"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group