In connection with my other question, "What is the best way to check DELETE logs?" . What is the PostgreSQL equivalent for CONTEXT_INFO?
[EDIT]
I want the log to be deleted using a trigger, but since I do not use the database user as my logical user for the application, I cannot register CURRENT_USER from the startup code as the user who deleted the entry. But for INSERT and UPDATE, you can record record changes from a trigger, since you can simply add a user field to records, for example insert_by and last_updated_by, and use these fields to enter the audit table.
source
share