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

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: Igor Korot <ikorot01(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is there a way to be notified on the CREATE TABLE execution?
Date: 2018-06-20 17:28:28
Message-ID: CA+bJJbz9Pwj16SGh5jvo1gNhUp3ngqwDYQ3kg+h3zdMmdg_V1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Melvin:

Maybe old eyes, but ...

On Wed, Jun 20, 2018 at 7:03 PM, Melvin Davidson <melvin6925(at)gmail(dot)com> wrote:
>>Is there a way to be notified on the CREATE TABLE execution?
> Here is sample code that will notify for a CREATE or DROP table:

Doesn't this trigger just log the events? I think it's missing
something like "Notify create_or_drop" somewhere after the logging (
so a listener knows to look at the log table ).

( Normally I would use something like this, listen to a channel, do a
first scan from the saved last tbl_cl_key, and then do another scan
from the last each time listen fires, it seems the difficult work is
done but it misses the notify to signal listeners and avoid having to
rescan on a timer or a similar thing ).

( Maybe I missed the line, it would not be the first time, that's why I ask ).

Francisco Olarte.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Jelinek 2018-06-20 17:35:30 Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Previous Message Francisco Olarte 2018-06-20 17:22:22 Re: Is there a way to be notified on the CREATE TABLE execution?