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: Tue, 3 Jul 2018 11:47:42 -0700
Message-ID: <e38d165f-c2b7-e112-3b60-df41d0b9784a@aklaver.com> (raw)
In-Reply-To: <CA+FnnTzkaY39==wd=ZG-GqHY-pmaroTxC1oi0yDnQ10_rFB4mA@mail.gmail.com>
References: <CA+FnnTxqScf6mDw_7HLMfu7YTagPrsYUw-bc=OKsBQ0TqprvEA@mail.gmail.com>
	<d17c5c84-2988-8536-21c4-17ce9a9ef18c@aklaver.com>
	<CA+FnnTyNceWUR7+rDdOgbNfzM-ZyY-YQiBG8f9ATiceBCOs8qw@mail.gmail.com>
	<7fc929ec-8e34-5824-6511-d1dd1188434f@aklaver.com>
	<CA+FnnTzkaY39==wd=ZG-GqHY-pmaroTxC1oi0yDnQ10_rFB4mA@mail.gmail.com>

On 07/03/2018 11:41 AM, Igor Korot wrote:
> Adrian,
> 
> On Tue, Jul 3, 2018 at 1:24 PM, Adrian Klaver <adrian.klaver@aklaver.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.klaver@aklaver.com




view thread (52+ messages)  latest in thread

Message-ID: <e38d165f-c2b7-e112-3b60-df41d0b9784a@aklaver.com>
Permalink:  ../e38d165f-c2b7-e112-3b60-df41d0b9784a@aklaver.com/
Also on:    postgresql.org/message-id/e38d165f-c2b7-e112-3b60-df41d0b9784a@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: <e38d165f-c2b7-e112-3b60-df41d0b9784a@aklaver.com>
  References: <CA+FnnTxqScf6mDw_7HLMfu7YTagPrsYUw-bc=OKsBQ0TqprvEA@mail.gmail.com> <d17c5c84-2988-8536-21c4-17ce9a9ef18c@aklaver.com> <CA+FnnTyNceWUR7+rDdOgbNfzM-ZyY-YQiBG8f9ATiceBCOs8qw@mail.gmail.com> <7fc929ec-8e34-5824-6511-d1dd1188434f@aklaver.com> <CA+FnnTzkaY39==wd=ZG-GqHY-pmaroTxC1oi0yDnQ10_rFB4mA@mail.gmail.com> <e38d165f-c2b7-e112-3b60-df41d0b9784a@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