Re: Trigger SQL script execution after DROP EXTENSION

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: amul sul <sul_amul(at)yahoo(dot)co(dot)in>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Trigger SQL script execution after DROP EXTENSION
Date: 2014-02-17 14:26:26
Message-ID: 53021C12.1080001@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 02/16/2014 09:52 PM, amul sul wrote:
> Hello ALL,
>
> I need little help regarding DROP EXTENSION.
>
> Can it will be possible to execute some SQL command automatically after
> DROP EXTENSION ?
>
> In my EXTENSION, I am changing some pg_catalog tuples, I want to restore
> it when my EXTENSION is dropped.
>
> Thanks in advance, any help or suggestion is appreciated.

Not sure what version you are on, but in 9.3+ there are EVENT TRIGGERS:

http://www.postgresql.org/docs/9.3/interactive/event-triggers.html

> Regards,
>
> Amul Sul

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message karsten 2014-02-17 19:49:38 include ids in query grouped by multipe values
Previous Message amul sul 2014-02-17 05:52:48 Trigger SQL script execution after DROP EXTENSION