Re: deparsing utility commands

From: Ryan Pedela <rpedela(at)datalanche(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: deparsing utility commands
Date: 2015-03-25 19:21:41
Message-ID: CACu89FSEPexTKG8d5ZzbLjSaGfF24JyUC181A8T272OALECNzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 25, 2015 at 11:59 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
>
>
> * Should we prohibit DDL from within event triggers?
>

Please don't prohibit DDL unless there is a really, really good reason to
do so. I have several use cases in mind for event triggers, but they are
only useful if I can perform DDL.

For example, I want to create an Elasticsearch FDW and use that to index
and search Postgres tables. When a table is created, I am planning to use
an event trigger to capture the CREATE event and automatically create a
foreign table via the Elasticsearch FDW. In addition, I would add normal
triggers to the new table which capture DML and update the foreign table
accordingly. In other words, I want to use FDWs and event triggers to
automatically sync table DDL and DML to Elasticsearch.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anastasia Lubennikova 2015-03-25 19:30:12 Re: GSoC 2015 proposal. Bitmap Index-only Count
Previous Message Andres Freund 2015-03-25 19:00:10 Re: Exposing PG_VERSION_NUM in pg_config