Bruce Momjian <bruce@momjian.us> writes:
> I didn't want to optimize for it --- I wanted a way to detect when DROP
> EXTENSION has no hope of working, and give more details. I assume the
> problem with that is the the object names are inside SQL scripts that
> cannot be easily interrogated. Are the pg_proc entries tied to the
> extension in some verifiable way that we could identify orphaned pg_proc
> lines?
You could look for 'e'-type pg_depend entries.
regards, tom lane