Thread: Trigger SQL script execution after DROP EXTENSION
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.
Regards,
Amul Sul
Amul Sul
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