PG Bug reporting form <noreply@postgresql.org> writes:
> When trying to drop a schema using DROP SCHEMA "brokenSchema";
> I'm facing the following error:
> requested object address for unsupported object class 2: text result ""
> The schema is empty from any table, type, trigger...
That shouldn't happen :-(. I am guessing the cause is a corrupt
entry in pg_depend. Class 2 is OCLASS_TYPE, so apparently some
type got dropped but its pg_depend entry wasn't cleaned out, so
DROP SCHEMA thinks there's still a dependent object.
I would try to pg_dump the database, and if you can do that and
reload successfully then discard the original. If you've found
one bit of catalog corruption there's likely more.
regards, tom lane