Re: Best way to monitor, control, or rewrite data definition commands?

From: John DeSoi <desoi(at)pgedit(dot)com>
To: "Turner, Ian" <Ian(dot)Turner(at)deshaw(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Best way to monitor, control, or rewrite data definition commands?
Date: 2009-05-13 01:31:09
Message-ID: AA7439E2-773B-4F48-8A4B-6C8F274FAB46@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On May 12, 2009, at 7:59 PM, Turner, Ian wrote:

> 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?

Correct, there are no triggers on the system tables.

Maybe some type of cron process that ensures there is foo_audit for
table foo?

John DeSoi, Ph.D.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2009-05-13 01:49:38 Re: Best way to monitor, control, or rewrite data definition commands?
Previous Message Turner, Ian 2009-05-12 23:59:22 Best way to monitor, control, or rewrite data definition commands?