From: David Gardner <david@gardnerit.net>
To: pgsql-docs@postgresql.org
Subject: proposed FAQ entry
Date: Fri, 22 Jun 2007 17:48:25 -0700
Message-ID: <467C6DD9.3090407@gardnerit.net> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: david@gardnerit.net
Subject: Re: proposed FAQ entry
In-Reply-To: <467C6DD9.3090407@gardnerit.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox