X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 690F69DCC3B for ; Wed, 21 Dec 2005 12:36:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73741-01 for ; Wed, 21 Dec 2005 12:35:59 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 032CB9DCC39 for ; Wed, 21 Dec 2005 12:35:57 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jBLGZtTJ013892; Wed, 21 Dec 2005 11:35:55 -0500 (EST) To: "Donald Fraser" cc: "[ADMIN]" Subject: Re: WITH SYSID feature dropped In-reply-to: <016201c60649$c6254b70$0264a8c0@demolish1> References: <011501c60578$47642e40$0264a8c0@demolish1> <29845.1135094224@sss.pgh.pa.us> <012201c60583$4a832080$0264a8c0@demolish1> <525.1135097989@sss.pgh.pa.us> <016201c60649$c6254b70$0264a8c0@demolish1> Comments: In-reply-to "Donald Fraser" message dated "Wed, 21 Dec 2005 16:15:35 +0000" Date: Wed, 21 Dec 2005 11:35:55 -0500 Message-ID: <13891.1135182955@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.028 required=5 tests=[AWL=0.028] X-Spam-Score: 0.028 X-Spam-Level: X-Archive-Number: 200512/246 X-Sequence-Number: 19966 "Donald Fraser" writes: > From: "Tom Lane" >> keeping the currently assigned OID in the aux table, setting the >> field to null or zero if the user doesn't currently exist in pg_authid. > Our "user" table stores information about the user before, during and > after the user is a postgresql user so that we can effectively hold an > audit of who has created, edited, deleted what and when. Therefore > the primary key (SYSID) in this table, is the foreign key in many > other tables that users can access for record creation and > modification. Therefore the primary key cannot be null when the > user is no longer a postgresql user and idealy we don't want it > changing as this could potentially mean 100's if not 1000's of > foreign key cascading updates. I didn't say it should be the primary key. You can still use a notional sysid as your pkey, you just need an additional column that records the current OID (if any) of the user as a PG user. This is essentially the reverse of your proposal to add an unused sysid column to pg_authid ... regards, tom lane