X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 014D4B43A1F for ; Thu, 3 Jul 2003 15:41:45 +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 29051-03 for ; Thu, 3 Jul 2003 12:41:31 -0300 (ADT) Received: from www.postgresql.com (www.postgresql.com [64.117.225.209]) by svr1.postgresql.org (Postfix) with ESMTP id 7779EB43A43 for ; Thu, 3 Jul 2003 12:41:29 -0300 (ADT) Received: from tomts19-srv.bellnexxia.net (tomts19.bellnexxia.net [209.226.175.73]) by www.postgresql.com (Postfix) with ESMTP id B220BCF76C3 for ; Thu, 3 Jul 2003 09:25:31 -0300 (ADT) Received: from [192.168.1.200] ([216.209.81.133]) by tomts19-srv.bellnexxia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030703122149.HKDR10532.tomts19-srv.bellnexxia.net@[192.168.1.200]>; Thu, 3 Jul 2003 08:21:49 -0400 Subject: Re: SEQUENCE and PRIMARY KEY From: Rod Taylor To: Dani Oderbolz Cc: pgsql-sql@postgresql.org In-Reply-To: <3F03E3B6.80807@ecologic.de> References: <200307021730.23659.ralf.werny@gmx.de> <1057160585.90653.88.camel@jester> <3F03E3B6.80807@ecologic.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-jW7IPdsIGMc46LpWG0NL" Message-Id: <1057234937.30368.26.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 03 Jul 2003 08:22:17 -0400 X-Archive-Number: 200307/45 X-Sequence-Number: 14159 --=-jW7IPdsIGMc46LpWG0NL Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > >A trigger (maybe a rule) is the way to go about this. > > > >The alternative is to teach the bad clients to use DEFAULT rather than > >NULL when they expect the GENERATOR to create the value for them. > > > Hmm, Rod, there really seems a demand for the GENERATOR feature :-) > Do you see any performance problems with a trigger instead of a default? > I cant imagine that its so much of a difference (ok, depending on the=20 > trigger, a > lookup in the catalog is needed, but still it should be fast enough, righ= t?) A trigger written in C will have similar speeds as processing the default. Plpgsql isn't that slow, but it is slower -- probably not noticeably for this operation. --=-jW7IPdsIGMc46LpWG0NL 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/BB/46DETLow6vwwRAhhRAJ0bZuXSdowp7OMdflJWXaSbGhfnRQCeNXgn 8Lv85S1ztafZsZFVXn3L2z8= =EzDu -----END PGP SIGNATURE----- --=-jW7IPdsIGMc46LpWG0NL--