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 15:15:50 -0800
Message-ID: <46a41f36-2799-a3ac-867b-d0f6195fd6bd@aklaver.com> (raw)
In-Reply-To: <CA+FnnTyV9CBFxGSg3ad_+zXO5_AtpMX6DQ5Kca-3rHWQF8ix=Q@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>
	<0790286e-e1f9-b8cc-7eb5-2fddfa208737@aklaver.com>
	<CA+FnnTyV9CBFxGSg3ad_+zXO5_AtpMX6DQ5Kca-3rHWQF8ix=Q@mail.gmail.com>

On 12/3/18 3:00 PM, Igor Korot wrote:
> Hi, Adrian,
> 
> On Mon, Dec 3, 2018 at 4:10 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>>
>> 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?
> 
> That was a bad word selection. ;-)
> 
> What I mean to say was "no schema changes/server changes that comes
> independently
> of the program install". Or something to that extent.

Which circles back around to the same question:

If there are to be no schema changes after the install why track them on 
subsequent connections?

Or maybe an explanation of what you are trying to achieve would make 
things clearer?



> 
> Sorry, ESL person here.
> 
> Thank you.
> 
>>
>>>
>>> But I will probably create it on every connection and delete on the
>>> disconnect (see above).
>>>
>>
>> --
>> Adrian Klaver
>> adrian.klaver@aklaver.com
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (52+ messages)  latest in thread

Message-ID: <46a41f36-2799-a3ac-867b-d0f6195fd6bd@aklaver.com>
Permalink:  ../46a41f36-2799-a3ac-867b-d0f6195fd6bd@aklaver.com/
Also on:    postgresql.org/message-id/46a41f36-2799-a3ac-867b-d0f6195fd6bd@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: <46a41f36-2799-a3ac-867b-d0f6195fd6bd@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> <CA+FnnTyV9CBFxGSg3ad_+zXO5_AtpMX6DQ5Kca-3rHWQF8ix=Q@mail.gmail.com> <46a41f36-2799-a3ac-867b-d0f6195fd6bd@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