Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVXtw-0007JB-25 for pgsql-general@arkaria.postgresql.org; Wed, 20 Jun 2018 07:51:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVXtu-0001vK-AY for pgsql-general@arkaria.postgresql.org; Wed, 20 Jun 2018 07:51:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVXtP-0006w1-Tk for pgsql-general@lists.postgresql.org; Wed, 20 Jun 2018 07:51:04 +0000 Received: from sonic317-22.consmr.mail.gq1.yahoo.com ([98.137.66.148]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVXtL-0002qo-Af for pgsql-general@postgresql.org; Wed, 20 Jun 2018 07:51:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1529481055; bh=tv694FrwW8U/8XM23LbDQ377nBZbVpJW4kzXq8CG3R0=; h=Date:From:To:In-Reply-To:References:Subject:From:Subject; b=eknOaCLFjk3Oe84HO7yBAkHPtAUM+CadIuSVF7486zTdybxj9kkT5hZxy4UEPQosqMw+au/Vb3XyYDW/8R/Mi6PSV+kTBu1JWYkruYpHUwFANEU0jz519hFl1qIrRLgek3ddaOw8x7rzUj9wFy6U3k3z5Zl31FCN+3FOeEcwsB6ucLrfIVZfnhhdde1bxgbJs97i59ObElUK5HNGIcljZ5KHLQGwkw/CwKnbcKf27AAFzGu0GM8Phfz8Br51SwarHfxiiAdoPa6petJyvPKcCn3fwyqkPFVM/22JNt7D7DS7kALXym4xVsqjb1wkGmOIT1w2Mb29LRpl/N+C/Yph1A== X-YMail-OSG: xh_Ry20VM1mHJYHOwudj6wnUcArCf2xD2JkYbW78NMp1sXDKbUofgdrQx9Q0U2. CL9Xd.XgFpaSnh2Z.F4KfceVDq0qBIy61xJbdqqLZM107cPWs8ev70IIWL3maLLKfsAMYAw_UnSq 6EYD9P.ZTDwwlzxDTbkIJmaIisG2jhSVEyeGCZuDXWwB5DsED3DekJ2Wp9b5TWAKrU2sP4w5O.8n fkWWuCkdFcW4nhkz6zsf02n2xGqLmtiD8A53acK_c3z47EJSTSpnG9Nbhy4PaPkYmxNQvt6jNIrT weQeQ.FjDwF4sju2kQhvNRAmLtObHgTIdwxqvbjpJ0ty12ypyPF8Qwk80l.aZprOOMZ9LCFr8i3D .2avEfqtAO1Lky._OeIY70R8zRwvsxk.qG9w5P_HwXNINxqXOGKCtI3b5Bh6uRyvGQzPrDFZvsMO wLP.WteoaDWxDdZayouPFDPWROsVJ753wGEvIHmTxbXLZY0qf0Du8UDlaMR92SkgVNcc2K64Y6GE J46NpUywzOSjor7MnVLcEmkZ6LP0eln2jNH5EcTPPC0bNUywqZCdxmawHo_CT.ZjRhUHxsDc4BMF CKE.NNVIbBW5n8mjvdvOxxwN8AF7hp3oTJsNBoNdnN3ibh4Ps.hSUJCpcfr9m2j5RxtxY3GrEmQQ qWPlZVVijkTo2VZ.PwW.lKiO7jndH7AzvTv_SCL3tNLXEodvb7d5IsuyuedhYO3mQlNQRowO505F G_WMtNpOAMshqEjBR.nflF1VasPxfha4rwFQrRBXlz3KmYOwAbIJXJc1TdNFEAOFDlgwB.e4Zidp HE7bLc35owblkgQqkQPiUbPs8KCHpLHHILUetidHYBwOnJbDC2egM.pBPhA44cUYcQGm_0ymDcrn yrM2grvcXcsbKsTcZTvv0YVPCYO6bjJZ5rkdDx8D68biS5V8IlQydzK8Wn9I- Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Wed, 20 Jun 2018 07:50:55 +0000 Date: Wed, 20 Jun 2018 07:50:55 +0000 (UTC) From: Pierre Timmermans To: pgsql-general , Igor Korot Message-ID: <2025368780.2391793.1529481055460@mail.yahoo.com> In-Reply-To: References: Subject: Re: Is there a way to be notified on the CREATE TABLE execution? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2391792_768661041.1529481055458" X-Mailer: WebService/1.1.11988 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 Content-Length: 2819 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_2391792_768661041.1529481055458 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I believe you could use an event trigger in postgres to capture the fact th= at a table was created:=C2=A0https://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 =20 On Wednesday, June 20, 2018, 12:08:48 AM GMT+2, Igor Korot wrote: =20 =20 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. =20 ------=_Part_2391792_768661041.1529481055458 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
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.

------=_Part_2391792_768661041.1529481055458--