X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 267EF31031A for ; Fri, 27 Jun 2003 14:55:07 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 89270-03 for ; Fri, 27 Jun 2003 11:54:55 -0300 (ADT) Received: from tomts5-srv.bellnexxia.net (tomts5.bellnexxia.net [209.226.175.25]) by svr1.postgresql.org (Postfix) with ESMTP id DA99F31034B for ; Fri, 27 Jun 2003 11:54:54 -0300 (ADT) Received: from [10.0.2.10] ([216.208.117.7]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030627145455.IBNX23206.tomts5-srv.bellnexxia.net@[10.0.2.10]>; Fri, 27 Jun 2003 10:54:55 -0400 Subject: Re: Change the behaviour of the SERIAL "Type" From: Rod Taylor To: Dani Oderbolz Cc: pgsql-sql@postgresql.org In-Reply-To: <3EFC5638.5040406@ecologic.de> References: <3EFC0413.7090006@ecologic.de> <20030627142635.GB15269@wolff.to> <3EFC5638.5040406@ecologic.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ga3xfeP1Gh29Td4O/pwK" Message-Id: <1056725718.25229.21.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 27 Jun 2003 14:55:19 +0000 X-Archive-Number: 200306/317 X-Sequence-Number: 14075 --=-ga3xfeP1Gh29Td4O/pwK Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > 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=20 > 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. --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-ga3xfeP1Gh29Td4O/pwK Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA+/FrW6DETLow6vwwRArfBAJwPfUIr6hmrXAT+k8rGybr8vM+RzwCfTHsN P9c7ZfuAktfrcx+2si9b65o= =SSqr -----END PGP SIGNATURE----- --=-ga3xfeP1Gh29Td4O/pwK--