Skip site navigation (1) Skip section navigation (2)

Re: proposed FAQ entry

From: Magnus Hagander <magnus(at)hagander(dot)net>
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 07:55:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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:
> >
> > 
> > 
> > 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

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


In response to


pgsql-docs by date

Next:From: David GardnerDate: 2007-06-29 13:45:24
Subject: Re: proposed FAQ entry
Previous:From: Alvaro HerreraDate: 2007-06-29 01:34:05
Subject: Re: proposed FAQ entry

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group