Re: ProcessUtility_hook - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: ProcessUtility_hook
Date
Msg-id 20091021100901.955B.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: ProcessUtility_hook  (Euler Taveira de Oliveira <euler@timbira.com>)
Responses Re: ProcessUtility_hook
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: Going, going, GUCs!
Next
From: u235sentinel
Date:
Subject: Re: postgres 8.3.8 and Solaris 10_x86 64 bit problems?