Don't record FDW user mappings as members of extensions.
authorTom Lane
Tue, 7 Aug 2018 20:32:50 +0000 (16:32 -0400)
committerTom Lane
Tue, 7 Aug 2018 20:33:03 +0000 (16:33 -0400)
commitf3ed5364e666f89d4e2856e20628eae9e5eb2f7c
tree8d9b76e3e151b7cf811d875293bdc0b30e5341e6
parentf73a31370624d7a67fc9c409df5be3da3778b462
Don't record FDW user mappings as members of extensions.

CreateUserMapping has a recordDependencyOnCurrentExtension call that's
been there since extensions were introduced (very possibly my fault).
However, there's no support anywhere else for user mappings as members
of extensions, nor are they listed as a possible member object type in
the documentation.  Nor does it really seem like a good idea for user
mappings to belong to extensions when roles don't.  Hence, remove the
bogus call.

(As we saw in bug #15310, the lack of any pg_dump support for this case
ensures that any such membership record would silently disappear during
pg_upgrade.  So there's probably no need for us to do anything else
about cleaning up after this mistake.)

Discussion: https://postgr.es/m/27952.1533667213@sss.pgh.pa.us
src/backend/commands/foreigncmds.c