| From: | David Gardner <david(at)gardnerit(dot)net> |
|---|---|
| To: | pgsql-docs(at)postgresql(dot)org |
| Subject: | proposed FAQ entry |
| Date: | 2007-06-23 00:48:25 |
| Message-ID: | 467C6DD9.3090407@gardnerit.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Smith | 2007-06-23 19:28:17 | Re: Volunteer to build a configuration tool |
| Previous Message | Joshua D. Drake | 2007-06-22 19:11:59 | Re: Postgre 8.2.3 Windows PL/Python Support |