Best way to monitor, control, or rewrite data definition commands?
| От | Turner, Ian |
|---|---|
| Тема | Best way to monitor, control, or rewrite data definition commands? |
| Дата | |
| Msg-id | 8744EE476651744882371AB948473F0B159E7E@mailnyc2.nyc.deshaw.com обсуждение исходный текст |
| Ответы |
Re: Best way to monitor, control, or rewrite data definition
commands?
Re: Best way to monitor, control, or rewrite data definition commands? |
| Список | pgsql-general |
Hello list, I am trying to implement automatic audit log tracking for newly created tables. When a user creates a table, I would like to create a second table for the audit log, along with the relevant rules. So for example, if a user does CREATE TABLE foo (fooid integer); Then I would also like to do CREATE TABLE foo_audit (fooid integer, <other columns>); along with the creation of some other triggers, rules, etc. Is there any way to be notified when a user executes data definition commands such as CREATE TABLE? It doesn't appear possible to apply triggers or rules to the system tables, and the query rewrite engine only seems to apply to SELECT, INSERT, and UPDATE. Thoughts? Cheers, --Ian Turner
В списке pgsql-general по дате отправления: