more ALTER .. DEPENDS ON EXTENSION fixes

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-02-17T22:53:33Z
Lists: pgsql-hackers

Attachments

ALTER ... DEPENDS ON EXTENSION (dependencies of type 'x' on an
extension) was found to have a few problems.  One was fixed as
CVE-2020-1720.  Other issues:

* pg_dump does not reproduce database state correctly.
  The attached 0000 fixes it.

* More than one 'x' dependencies are allowed for the same object on the
  same extension.  That's useless and polluting, so should be prevented.

* There's no way to remove an 'x' dependency.

I'll send patches for the other two issues as replies later.  (I
discovered an issue in my 0001, for the second one, just as I was
sending.)

-- 
Álvaro Herrera

Commits

  1. Add tab-completion for ALTER INDEX .. [NO] DEPENDS ON

  2. Add ALTER .. NO DEPENDS ON

  3. Add pg_dump support for ALTER obj DEPENDS ON EXTENSION

  4. Avoid duplicates in ALTER ... DEPENDS ON EXTENSION