Re: Change the behaviour of the SERIAL "Type" - Mailing list pgsql-sql

From Rod Taylor
Subject Re: Change the behaviour of the SERIAL "Type"
Date
Msg-id 1056725718.25229.21.camel@jester
Whole thread Raw
In response to Re: Change the behaviour of the SERIAL "Type"  (Dani Oderbolz <oderbolz@ecologic.de>)
List 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@rbt.ca>

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

pgsql-sql by date:

Previous
From: Dani Oderbolz
Date:
Subject: Re: Change the behaviour of the SERIAL "Type"
Next
From: Bruno Wolff III
Date:
Subject: Re: Getting all rows even if not a member of any groups