pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre Timmermans <ptim007@yahoo.com>
To: pgsql-general <pgsql-general@postgresql.org>
To: Igor Korot <ikorot01@gmail.com>
Subject: Re: Is there a way to be notified on the CREATE TABLE execution?
Date: Wed, 20 Jun 2018 07:50:55 +0000 (UTC)
Message-ID: <2025368780.2391793.1529481055460@mail.yahoo.com> (raw)
In-Reply-To: <CA+FnnTz-SYt3PVp=Ks+rdFYe1rBgOMx17D5jbcMpown_jjSBYw@mail.gmail.com>
References: <CA+FnnTz-SYt3PVp=Ks+rdFYe1rBgOMx17D5jbcMpown_jjSBYw@mail.gmail.com>

I believe you could use an event trigger in postgres to capture the fact that a table was created: https://www.postgresql.org/docs/current/static/event-triggers.html
In the trigger you would then have to code whatever is needed to notify the external software (via a REST call or by posting something in a messaging bus, ...)


Regards, Pierre
 

    On Wednesday, June 20, 2018, 12:08:48 AM GMT+2, Igor Korot <ikorot01@gmail.com> wrote:  
 
 Hi, ALL,
Consider a scenario:

1. A software that uses libpq is executing.
2. Someone opens up a terminal and creates a table.
3. A software needs to know about this new table.

I presume this is a DBMS-specific...

Thank you.

  

view thread (13+ messages)  latest in thread

Message-ID: <2025368780.2391793.1529481055460@mail.yahoo.com>
Permalink:  ../2025368780.2391793.1529481055460@mail.yahoo.com/
Also on:    postgresql.org/message-id/2025368780.2391793.1529481055460@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ptim007@yahoo.com, ikorot01@gmail.com
  Subject: Re: Is there a way to be notified on the CREATE TABLE execution?
  In-Reply-To: <2025368780.2391793.1529481055460@mail.yahoo.com>
  References: <CA+FnnTz-SYt3PVp=Ks+rdFYe1rBgOMx17D5jbcMpown_jjSBYw@mail.gmail.com> <2025368780.2391793.1529481055460@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox