A generic trigger to log chanes on database tables
| От | Charles Ambrose |
|---|---|
| Тема | A generic trigger to log chanes on database tables |
| Дата | |
| Msg-id | 61ca079e0611230832i4744b831j6436f72d8f6c7130@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: A generic trigger to log chanes on database tables
Re: A generic trigger to log chanes on database tables |
| Список | pgsql-general |
Hi!
Is there a way that I could create a trigger that logs the changes (updates, deletes) of a table? I mean, I want to put in a table the changes to any table in a database and also put in the table the column that was modified and the corresponding value.
My audit table looks like this:
Table name: TableChangesLog
Columns: ChangeID int not null auto_increment --> Primary Key of table
TableName -> Name of table modified
ColumnName -> Column modified
ColumnValue -> The original value
Operation -> "Update" or "Delete"
My idea is to create a generic trigger that will log all changes for all database tables.
Is this possible?
Thanks in advance ...
Is there a way that I could create a trigger that logs the changes (updates, deletes) of a table? I mean, I want to put in a table the changes to any table in a database and also put in the table the column that was modified and the corresponding value.
My audit table looks like this:
Table name: TableChangesLog
Columns: ChangeID int not null auto_increment --> Primary Key of table
TableName -> Name of table modified
ColumnName -> Column modified
ColumnValue -> The original value
Operation -> "Update" or "Delete"
My idea is to create a generic trigger that will log all changes for all database tables.
Is this possible?
Thanks in advance ...
В списке pgsql-general по дате отправления: