ProcessUtility_hook

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ProcessUtility_hook
Date: 2009-10-20 09:09:07
Message-ID: 20091020175652.37AF.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We can hook SELECT, INSERT, UPDATE and DELETE with ExecutorXxx_hooks,
but there is no way to hook DDL commands. Can I submit a patch to add
ProcessUtility_hook?

pg_stat_statements module also handle DDL commands as same as normal
queries. Fortunately, autovacuum calls call vacuum() directly,
so the statistics will not filled with VACUUM and ANALYZE commands
by autovacuum.

There might be another usage for the hook. Since we can filter all
SQL commands using ExecutorRun_hook and ProcessUtility_hook, so we
could write query text for database audit with programmable filter
in the hooks.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-10-20 09:54:41 Re: UTF8 with BOM support in psql
Previous Message Dave Page 2009-10-20 08:54:18 Re: Re: BUG #5065: pg_ctl start fails as administrator, with "could not locate matching postgres executable"