Re: WITH SYSID feature dropped

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WITH SYSID feature dropped
Дата
Msg-id 13891.1135182955@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WITH SYSID feature dropped  ("Donald Fraser" <postgres@kiwi-fraser.net>)
Список pgsql-admin
"Donald Fraser" <postgres@kiwi-fraser.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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Donald Fraser"
Дата:
Сообщение: Re: WITH SYSID feature dropped
Следующее
От: "Donald Fraser"
Дата:
Сообщение: Re: WITH SYSID feature dropped