From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | David Gardner <david(at)gardnerit(dot)net>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: proposed FAQ entry |
Date: | 2007-06-29 01:34:05 |
Message-ID: | 20070629013405.GJ32626@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
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.
Hmm, I do see it from time to time in pgsql-es-ayuda. Maybe not as
frequently as some other questions that are also missing from the FAQ
(like a thorough explanation of encoding issues), but I digress.
--
Alvaro Herrera http://www.PlanetPostgreSQL.org/
"Ni aun el genio muy grande llegaría muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2007-06-29 07:55:09 | Re: proposed FAQ entry |
Previous Message | Bruce Momjian | 2007-06-29 01:06:20 | Re: proposed FAQ entry |