postgresql/src/backend
Alvaro Herrera 899a04f5ed
Avoid duplicates in ALTER ... DEPENDS ON EXTENSION
If the command is attempted for an extension that the object already
depends on, silently do nothing.

In particular, this means that if a database containing multiple such
entries is dumped, the restore will silently do the right thing and
record just the first one.  (At least, in a world where pg_dump does
dump such entries -- which it doesn't currently, but it will.)

Backpatch to 9.6, where this kind of dependency was introduced.

Reviewed-by: Ibrar Ahmed, Tom Lane (offlist)
Discussion: https://postgr.es/m/20200217225333.GA30974@alvherre.pgsql
2020-03-11 11:04:59 -03:00
..
access Remove HAVE_WORKING_LINK 2020-03-11 11:23:04 +01:00
bootstrap Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
catalog Avoid duplicates in ALTER ... DEPENDS ON EXTENSION 2020-03-11 11:04:59 -03:00
commands Avoid duplicates in ALTER ... DEPENDS ON EXTENSION 2020-03-11 11:04:59 -03:00
executor Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit Extend ExecBuildAggTrans() to support a NULL pointer check. 2020-03-04 17:29:18 -08:00
lib Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
libpq Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
main Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nodes Marginal comments and docs cleanup. 2020-03-10 17:34:09 -04:00
optimizer Save calculated transitionSpace in Agg node. 2020-02-27 11:20:56 -08:00
parser Ensure that CREATE TABLE LIKE copies any NO INHERIT constraint property. 2020-03-10 14:54:00 -04:00
partitioning Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
po Translation updates 2019-06-17 15:30:20 +02:00
port Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Avoid failure if autovacuum tries to access a just-dropped temp namespace. 2020-02-28 20:28:34 -05:00
regex Update copyrights for 2020 2020-01-01 12:21:45 -05:00
replication Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
rewrite Make rewriter prevent auto-updates on views with conditional INSTEAD rules. 2020-01-14 09:52:21 +00:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
storage Remove HAVE_WORKING_LINK 2020-03-11 11:23:04 +01:00
tcop Allow ALTER TYPE to change some properties of a base type. 2020-03-06 12:19:29 -05:00
tsearch Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
utils Clean up order in miscinit.c a bit 2020-03-11 13:51:55 +01:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2019-05-20 16:00:53 +02:00