Re: Missing pg_depend entries for constraints created by extensions (deptype 'e') - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Missing pg_depend entries for constraints created by extensions (deptype 'e')
Date
Msg-id 3154233.1748793853@sss.pgh.pa.us
Whole thread Raw
In response to Re: Missing pg_depend entries for constraints created by extensions (deptype 'e')  ("Joel Jacobson" <joel@compiler.org>)
List pgsql-hackers
"Joel Jacobson" <joel@compiler.org> writes:
> Explicitly adding deptype='e' entries for all objects created during
> CREATE EXTENSION would significantly improve this situation.
> With this enhancement, pg_dump could easily detect and warn users about
> manually-added objects, or even dump these objects as comments for manual review.

I'm pretty skeptical that this situation justifies the amount of
pg_depend bloat that you're suggesting.  I also don't think it'd be
easy or cheap for pg_dump to detect objects that should be dumped
because they lack an 'e' dependency but depend on objects that do
have one.  Normally, because extension member objects aren't dumped,
pg_dump doesn't even collect info on their indexes etc.

In short, it seems like quite a lot of work and quite a lot of
overhead (paid by everybody) to accommodate somebody abusing
extensions in one very specific way.  There are a lot of scenarios
in which a cowboy DBA can cause the database contents to differ
from what the extension scripts say, and most of them would not
be helped by what you're suggesting.

            regards, tom lane



pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: CREATE DOMAIN create two not null constraints
Next
From: Jiří Kavalík
Date:
Subject: [PATCH] Support for basic ALTER TABLE progress reporting.