I need to add an audit trail to my application. I thought that I would add
the user id and timestamp to the tables where I need to track 'last modified
by...'. Currently there is a table tbl_employee that I would like to be able
to cross reference to in order to obtain the user's real name when necessary.
MYDB=# \d peachtree.tbl_employee
Column | Type | Modifiers
id | character varying(20) | not null
first_name | character varying(15) | not null
middle_initial | character(1) |
last_name | character varying(20) | not null
inactive | boolean | not null
email | character varying(64) |
"tbl_employee_pkey" PRIMARY KEY, btree (id)
Is there a way to obtain the postgres user id or must I store the output of
session_user in the tables?
Are there some existing functions and or tools for implementing audit trails?
What technique do most people use for this type of functionality?
Your input is appreciated.
pgsql-novice by date
|Next:||From: Michael Fuhr||Date: 2005-04-25 15:35:34|
|Subject: Re: audit information|
|Previous:||From: John DeSoi||Date: 2005-04-25 00:20:26|
|Subject: Re: download|