git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 8bca5f9) | patch
Avoid duplicates in ALTER ... DEPENDS ON EXTENSION
2020年3月11日 14:04:59 +0000 (11:04 -0300)
2020年3月11日 14:04:59 +0000 (11:04 -0300)
commit b7739ebecdcc157be2fee348912ae3197383895f
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
src/backend/catalog/pg_depend.c diff | blob | blame | history
src/backend/commands/alter.c diff | blob | blame | history
src/include/catalog/dependency.h diff | blob | blame | history
src/test/modules/test_extensions/expected/test_extdepend.out diff | blob | blame | history
src/test/modules/test_extensions/sql/test_extdepend.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /