Re: proposed FAQ entry

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: proposed FAQ entry
Дата
Msg-id 20070629075509.GC20255@svr2.hagander.net
обсуждение исходный текст
Ответ на Re: proposed FAQ entry  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: proposed FAQ entry  (David Gardner <david@gardnerit.net>)
Список pgsql-docs
On Thu, Jun 28, 2007 at 09:06:20PM -0400, Bruce Momjian wrote:
> David Gardner wrote:
> > Earlier today I was tempted to start storing usesysid's as foreign keys
> > in one of my tables by doing:
> > SELECT usesysid FROM pg_user WHERE pg_user.usename= user;
> >
> > My proposed FAQ entry is based on this mailing list post which convinced
> > me not to:
> > http://archives.postgresql.org/pgsql-novice/2005-04/msg00328.php
> >
> >
> > So the Question would be:
> >
> > Q) How do I keep track of edits to a table? OR Can I use store usesysid
> > in my table to identify users?
> >
> > A) No because usesysid values are not guaranteed to remain the same
> > after a restore, or upgrade. Instead store the user name as text, if
> > needed create your own user table and associate the user names with
> > integer keys.
>
> Uh, sorry, this is not a _frequent_ question/issue.

If it's not frequent, perhaps it should at least go in the documentatino
somewhere?

(I confess I haven't checked if it's actually there already)

//Magnus

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: proposed FAQ entry
Следующее
От: David Gardner
Дата:
Сообщение: Re: proposed FAQ entry