Re: Proposal: Store "timestamptz" of database creation on "pg_database" - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Proposal: Store "timestamptz" of database creation on "pg_database"
Date
Msg-id 20121229143441.GP16126@tamriel.snowman.net
Whole thread Raw
In response to Re: Proposal: Store "timestamptz" of database creation on "pg_database"  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Proposal: Store "timestamptz" of database creation on "pg_database"
List pgsql-hackers
Dimitri,

* Dimitri Fontaine (dimitri@2ndQuadrant.fr) wrote:
> I personnaly think that given a good documentation coverage having Event
> Trigger on global objects could be useful enough, even if you would have
> to install them in every database when you want them to fire no matter
> what.

I disagree.  If we're going to have what are essentially 'global' event
triggers, then they should go into a shared catalog- the user shouldn't
be required to install them everywhere to get coverage.  In addition,
they should always fire in the same database (eg: postgres), so you
could reasonably have a single log of 'CREATE DATABASE' commands being
run.  Of course, then we get into the technical issues which prevent
that, such as having one backend connected to database xyz but needing
to run commands in the postgres database.

So, for my 2c, I do think there's a technical challenge which would have
to be overcome to have global event triggers.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: ILIKE vs indices
Next
From: Dimitri Fontaine
Date:
Subject: Re: Proposal: Store "timestamptz" of database creation on "pg_database"