Re: WITH SYSID feature dropped

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
Cc: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: WITH SYSID feature dropped
Date: 2005-12-21 16:35:55
Message-ID: 13891.1135182955@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Donald Fraser" <postgres(at)kiwi-fraser(dot)net> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jaime Casanova 2005-12-21 18:19:10 Re: cache lookup failed for type
Previous Message Donald Fraser 2005-12-21 16:35:00 Re: WITH SYSID feature dropped