From: | Moshe Jacobson <moshe(at)neadwerx(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Wanted: ALTER TRIGGER ... OWNED BY EXTENSION |
Date: | 2014-03-31 22:23:50 |
Message-ID: | CAJ4CxLkcpbwE4Rtv_WXYS_C1M3K3WAiwJ6MMpt409QXMCXtekQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Mar 31, 2014 at 5:19 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Basically what you need to end up with is
>
> * trigger function has a membership dependency on the extension
>
Yes, the dependency is set up when the trigger function is dynamically
created by using ALTER EXTENSION ... ADD FUNCTION
* pg_trigger row has a normal dependency on the trigger function it uses
>
Aha, this is not present. I think it is due to some migration magic I did a
while ago.
Is there a way to clean up the dependencies, or at least list out the
dependencies that seem suspicious?
* pg_trigger row has an auto dependency on the table it's for
>
This is present.
Note: depending on what it is you're trying to accomplish, it might be
> saner for the pg_trigger rows to have auto dependencies on their trigger
> functions. Depends whether you'd like DROP EXTENSION to complain or just
> shut up and drop the triggers.
>
I would love for DROP EXTENSION to shut up and drop the triggers, but I'm
not sure how to accomplish that without manually manipulating pg_depend
(and even then I'm not sure if that'll do it). Suggestions welcome.
Thanks.
Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc. <http://www.neadwerx.com>
2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339
"Quality is not an act, it is a habit." -- Aristotle
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2014-04-01 02:20:54 | Re: Postgres as In-Memory Database? |
Previous Message | Tom Lane | 2014-03-31 21:19:29 | Re: Wanted: ALTER TRIGGER ... OWNED BY EXTENSION |