pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: David Gardner <david@gardnerit.net>
Cc: pgsql-docs@postgresql.org
Subject: Re: proposed FAQ entry
Date: Thu, 28 Jun 2007 21:06:20 -0400 (EDT)
Message-ID: <200706290106.l5T16KU18798@momjian.us> (raw)
In-Reply-To: <467C6DD9.3090407@gardnerit.net>

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.

-- 
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +



view thread (5+ messages)  latest in thread

Message-ID: <200706290106.l5T16KU18798@momjian.us>
Permalink:  ../200706290106.l5T16KU18798@momjian.us/
Also on:    postgresql.org/message-id/200706290106.l5T16KU18798@momjian.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-docs@postgresql.org
  Cc: bruce@momjian.us, david@gardnerit.net
  Subject: Re: proposed FAQ entry
  In-Reply-To: <200706290106.l5T16KU18798@momjian.us>
  References: <467C6DD9.3090407@gardnerit.net> <200706290106.l5T16KU18798@momjian.us>

* 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