It is not possible to assign triggers to system tables hence it is
impossible to reference system table in FK constraint. Obviously, users that
don't exist in the database cannot modify anything, you can use
session_user and current_user functions for logging purposes, see
Anton Nikiforov wrote:
Dear all,
i'm trying to create tables using pg_user (pg_authid) as a foreign key
for my table. I need to log and control that only registered users can
modify data and i want to control data changes via logging triggers. I
need to know who exactly was modifying data. To
Dear all,
i'm trying to create tables using pg_user (pg_authid) as a foreign key
for my table. I need to log and control that only registered users can
modify data and i want to control data changes via logging triggers. I
need to know who exactly was modifying data. To be more exact i want to