agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@gmail.com>
To: amul sul <sul_amul@yahoo.co.in>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Trigger SQL script execution after DROP EXTENSION
Date: Mon, 17 Feb 2014 06:26:26 -0800
Message-ID: <53021C12.1080001@gmail.com> (raw)
In-Reply-To: <1392616368.60045.YahooMailNeo@web193501.mail.sg3.yahoo.com>
References: <1392616368.60045.YahooMailNeo@web193501.mail.sg3.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.klaver@gmail.com


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (2+ messages)

Message-ID: <53021C12.1080001@gmail.com>
Permalink:  ../53021C12.1080001@gmail.com/
Also on:    postgresql.org/message-id/53021C12.1080001@gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adrian.klaver@gmail.com, sul_amul@yahoo.co.in
  Subject: Re: Trigger SQL script execution after DROP EXTENSION
  In-Reply-To: <53021C12.1080001@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox