From: Rod Taylor <rbt@rbt.ca>
To: Dani Oderbolz <oderbolz@ecologic.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Change the behaviour of the SERIAL "Type"
Date: 27 Jun 2003 14:55:19 +0000
Message-ID: <1056725718.25229.21.camel@jester> (raw)
In-Reply-To: <3EFC5638.5040406@ecologic.de>
References: <FA785BC0-A7EF-11D7-8248-000A957653D6@tercent.net>
<3EFC0413.7090006@ecologic.de>
<20030627142635.GB15269@wolff.to>
<3EFC5638.5040406@ecologic.de>
> 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.ascAttachments:
signature.asc (application/pgp-signature, 186B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rbt@rbt.ca, oderbolz@ecologic.de
Subject: Re: Change the behaviour of the SERIAL "Type"
In-Reply-To: <1056725718.25229.21.camel@jester>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox