Re: How to watch for schema changes

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to watch for schema changes
Date: 2018-07-03 18:47:42
Message-ID: e38d165f-c2b7-e112-3b60-df41d0b9784a@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/03/2018 11:41 AM, Igor Korot wrote:
> Adrian,
>
> On Tue, Jul 3, 2018 at 1:24 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>> On 07/03/2018 11:15 AM, Igor Korot wrote:

>>
>> Are you forced to work with 9.1 or can you use something from here:
>>
>> https://www.postgresql.org/download/macosx/
>>
>> to get a newer version? FYI that will be a major upgrade so will require a
>> dump/restore or use of pg_upgrade.
>
> Unfortunately I'm stuck with 9.1.
> But I have a Linux machine which have a newer version so I can test
> this solution.
> And it would be nice to have both machine/versions working.
>

Well it won't be back ported so I am not seeing that working in 9.1 and
I don't know of any other solution.

>> It can use functions written in PL languages. See below:
>>
>> https://www.postgresql.org/docs/10/static/sql-createeventtrigger.html
>>
>> for an example written in plpgsql.
>
> OK.
> I presume threre is a query which check for the function/trigger
> existence? Something like:
>
> IF NOT EXIST(SELECT * FROM ) CREATE OR REPLACE FUNCTION....;

https://www.postgresql.org/docs/10/static/catalog-pg-event-trigger.html

>
> Thank you.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2018-07-03 18:59:57 Re: How to watch for schema changes
Previous Message David G. Johnston 2018-07-03 18:46:49 Re: How to watch for schema changes