Re: Is there a way to be notified on the CREATE TABLE execution?

From: Pierre Timmermans <ptim007(at)yahoo(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>, Igor Korot <ikorot01(at)gmail(dot)com>
Subject: Re: Is there a way to be notified on the CREATE TABLE execution?
Date: 2018-06-20 07:50:55
Message-ID: 2025368780.2391793.1529481055460@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pierre Timmermans 2018-06-20 08:06:31 Re: using pg_basebackup for point in time recovery
Previous Message Łukasz Jarych 2018-06-20 05:58:19 Re: Run Stored procedure - function from VBA