Re: Best way to monitor, control, or rewrite data definition commands?
От | Greg Smith |
---|---|
Тема | Re: Best way to monitor, control, or rewrite data definition commands? |
Дата | |
Msg-id | alpine.GSO.2.01.0905122142430.7859@westnet.com обсуждение исходный текст |
Ответ на | Best way to monitor, control, or rewrite data definition commands? ("Turner, Ian" <Ian.Turner@deshaw.com>) |
Ответы |
Re: Best way to monitor, control, or rewrite data definition commands?
|
Список | pgsql-general |
On Tue, 12 May 2009, Turner, Ian wrote: > 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? This topic really deserves a FAQ entry. You can set "log_statement=ddl" and see a log of them that way: http://www.postgresql.org/docs/8.3/static/runtime-config-logging.html#GUC-LOG-STATEMENT Setup CSV format logs and you can even import that into a database table, appropriate log rotation is needed to give you breakpoints to import at though. The other common idiom here to detect changes is to save the output from "pgdump -s" regularly and look for changes via diff. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
В списке pgsql-general по дате отправления: