On Mon, Mar 31, 2014 at 5:19 PM, Tom Lane <tgl@xxxxxxxxxxxxx> 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.
2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339
"Quality is not an act, it is a habit." -- Aristotle
"Quality is not an act, it is a habit." -- Aristotle