Re: postgres event trigger workaround - Mailing list pgsql-general

From Julien Rouhaud
Subject Re: postgres event trigger workaround
Date
Msg-id 20220112125517.idglbczyiargb56f@jrouhaud
Whole thread Raw
In response to postgres event trigger workaround  ("Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch>)
Responses AW: [Extern] Re: postgres event trigger workaround
List pgsql-general
Hi,

On Wed, Jan 12, 2022 at 11:57:45AM +0000, Zwettler Markus (OIZ) wrote:
> 
> PG event triggers are not firing on CREATE ROLE, CREATE DATABASE, CREATE
> TABLESPACE by definition (would be nice if they do).
> 
> Is there any workaround to react with ddl_command_start behavior on such an
> event?

That's not possible.  The limitation exists because those objects are shared
objects and therefore could be created from any database in the cluster.

What is your use case?  Maybe you could rely on logging all DDL instead for
instance.



pgsql-general by date:

Previous
From: Issa Gorissen
Date:
Subject: WAL Archiving and base backup
Next
From: Simon Riggs
Date:
Subject: Re: pg_stat_statements