pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Igor Korot <ikorot01@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: How to watch for schema changes
Date: Mon, 3 Dec 2018 14:10:40 -0800
Message-ID: <0790286e-e1f9-b8cc-7eb5-2fddfa208737@aklaver.com> (raw)
In-Reply-To: <CA+FnnTwB6vbo+7nTtboi5Ffs9o07bZQ-U9U8yQ4yLrc8iEF5Eg@mail.gmail.com>
References: <CA+FnnTxqScf6mDw_7HLMfu7YTagPrsYUw-bc=OKsBQ0TqprvEA@mail.gmail.com>
	<d17c5c84-2988-8536-21c4-17ce9a9ef18c@aklaver.com>
	<CA+FnnTwWkSixK66ZiLzrdod7hfHkpp0okKFJAnFE8bfBhtaAQQ@mail.gmail.com>
	<53538bab-5f26-247d-15bf-94785fdfb252@aklaver.com>
	<CA+FnnTzwLRxVU-2iGXGnDyqTcyybYwc1vFFcsfrE=PapaqgN+Q@mail.gmail.com>
	<761d4f03-08f4-e354-9cc0-d3cc5d0319c4@aklaver.com>
	<CA+FnnTyx15GbSKvF8NP_eyn2BTepk6x6fRubwgnwRy283=dw6g@mail.gmail.com>
	<4316b506-95d0-59b2-7857-5ae896e07e60@aklaver.com>
	<CA+FnnTwB6vbo+7nTtboi5Ffs9o07bZQ-U9U8yQ4yLrc8iEF5Eg@mail.gmail.com>

On 12/3/18 1:53 PM, Igor Korot wrote:
> Hi, Adrian,

>> Why? Just create the trigger once in a script. Event triggers are an
>> attribute of the database and stay with it until they are dropped. If
>> you want to turn then on and off use the ALTER  EVENT TRIGGER
>> ENABLE/DISABLE. If you insist on recreating them on each connection then:
>>
>> https://www.postgresql.org/docs/10/sql-dropeventtrigger.html
>> DROP EVENT TRIGGER [ IF EXISTS ] name [ CASCADE | RESTRICT ]
>> CREATE EVENT TRIGGER ...
> 
> I was hoping to create a software which will be just "install-and-use".
> No additional script running or database changes is required.

After I hit reply my subconscious kicked in and pointed out something:)

If there are no database changes why do you need to track schema changes?

> 
> But I will probably create it on every connection and delete on the
> disconnect (see above).
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (52+ messages)  latest in thread

Message-ID: <0790286e-e1f9-b8cc-7eb5-2fddfa208737@aklaver.com>
Permalink:  ../0790286e-e1f9-b8cc-7eb5-2fddfa208737@aklaver.com/
Also on:    postgresql.org/message-id/0790286e-e1f9-b8cc-7eb5-2fddfa208737@aklaver.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: adrian.klaver@aklaver.com, ikorot01@gmail.com
  Subject: Re: How to watch for schema changes
  In-Reply-To: <0790286e-e1f9-b8cc-7eb5-2fddfa208737@aklaver.com>
  References: <CA+FnnTxqScf6mDw_7HLMfu7YTagPrsYUw-bc=OKsBQ0TqprvEA@mail.gmail.com> <d17c5c84-2988-8536-21c4-17ce9a9ef18c@aklaver.com> <CA+FnnTwWkSixK66ZiLzrdod7hfHkpp0okKFJAnFE8bfBhtaAQQ@mail.gmail.com> <53538bab-5f26-247d-15bf-94785fdfb252@aklaver.com> <CA+FnnTzwLRxVU-2iGXGnDyqTcyybYwc1vFFcsfrE=PapaqgN+Q@mail.gmail.com> <761d4f03-08f4-e354-9cc0-d3cc5d0319c4@aklaver.com> <CA+FnnTyx15GbSKvF8NP_eyn2BTepk6x6fRubwgnwRy283=dw6g@mail.gmail.com> <4316b506-95d0-59b2-7857-5ae896e07e60@aklaver.com> <CA+FnnTwB6vbo+7nTtboi5Ffs9o07bZQ-U9U8yQ4yLrc8iEF5Eg@mail.gmail.com> <0790286e-e1f9-b8cc-7eb5-2fddfa208737@aklaver.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