Here is a patch to add ProcessUtility_hook to handle all DDL
commands in user modules. (ProcessUtility_hook_20091021.patch)
It adds a global variable 'ProcessUtility_hook' and
export the original function as 'standard_ProcessUtility'.
Euler Taveira de Oliveira <euler@timbira.com> wrote:
> > 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.
> >
> I don't look at the code but maybe there is a way to hook something there too.
> But I'd leave it alone for now, unless it's few lines of code.
I see it is debatable whether pg_stat_statements should support the hook.
So I split the change in another patch. (pgss_utility_hook_20091021.patch)
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center