any default columns for tracking / auditing purpose

Started by Sanjay Minniover 4 years ago2 messagesgeneral
Jump to latest
#1Sanjay Minni
sanjay.minni@gmail.com

In Postgres 12 and up, are there any default columns available which could
be useful for tracking / auditing purposes ?
e.g.
- real user who entered / updated the data
- timestamp when data was updated / entered
where can i get a list of such default columns (if any) - which could be
accessed easily in user applications.

also what is the usual practice in creating userID's in a large
multi-tenanted applications with highly dynamically changing users (e.g
students who enroll and go off after some sometime), with all users having
the same access -
is a different userID created in the system for each user or is a common
postgresID used by the application and the application is responsible for
tracking individual users with its own userID. (this will reduce system
overhead)

with warm regards
Sanjay

#2Rob Sargent
robjsargent@gmail.com
In reply to: Sanjay Minni (#1)
Re: any default columns for tracking / auditing purpose

On Nov 20, 2021, at 6:50 AM, Sanjay Minni <sanjay.minni@gmail.com> wrote:

In Postgres 12 and up, are there any default columns available which could be useful for tracking / auditing purposes ?
e.g.
- real user who entered / updated the data
- timestamp when data was updated / entered
where can i get a list of such default columns (if any) - which could be accessed easily in user applications.

also what is the usual practice in creating userID's in a large multi-tenanted applications with highly dynamically changing users (e.g students who enroll and go off after some sometime), with all users having the same access -
is a different userID created in the system for each user or is a common postgresID used by the application and the application is responsible for tracking individual users with its own userID. (this will reduce system overhead)

Never ever re-use an id. There are lots of them. If you need lots and lots of them use UUID.

Show quoted text

with warm regards
Sanjay