X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A4ACAD1B23E for ; Sat, 24 Jul 2004 06:20:16 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45307-03 for ; Sat, 24 Jul 2004 09:20:14 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 7A1D8D1B232 for ; Sat, 24 Jul 2004 06:20:06 -0300 (ADT) Received: (qmail 15104 invoked by uid 65534); 24 Jul 2004 09:20:13 -0000 Received: from p5087FDBD.dip0.t-ipconnect.de (EHLO hermes.hilbert.loc) (80.135.253.189) by mail.gmx.net (mp016) with SMTP; 24 Jul 2004 11:20:13 +0200 X-Authenticated: #1433807 Received: (from ncq@localhost) by hermes.hilbert.loc (8.11.6/8.11.6/SuSE Linux 0.5) id i6O96Zv01196 for pgsql-sql@postgresql.org; Sat, 24 Jul 2004 11:06:35 +0200 Date: Sat, 24 Jul 2004 11:06:35 +0200 From: Karsten Hilbert To: pgsql-sql@postgresql.org Subject: Re: surrogate key or not? Message-ID: <20040724110634.B699@hermes.hilbert.loc> References: <1090325769.3241.27.camel@dicaprio.akademie1.de> <200407221005.59482.josh@agliodbs.com> <20040723085721.C728@hermes.hilbert.loc> <0407231327461F.01150@thenilgiris.com> <19813.1090591668@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19813.1090591668@sss.pgh.pa.us> User-Agent: Mutt/1.3.22.1i Re-X-turn-receipt-to: Karsten.Hilbert@gmx.net Di-X-sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi-X-rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri-X-ority: 2 (High) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/206 X-Sequence-Number: 18458 On Fri, Jul 23, 2004 at 10:07:48AM -0400, Tom Lane wrote: > The other standard reason for using a made-up value as primary key is > that it's under your control and you can guarantee it isn't going to > change: one record will have the same primary key for its entire life, > which vastly simplifies handling of foreign keys and so forth. That is pretty much the main reason why our schema does so. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346