Recurse to sequences on ownership change for all relkinds

Peter Eisentraut <peter_e@gmx.net>

Commit: 26b877d280eeb23d57b507a1ebb14f240d317eb8
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2018-09-26T18:33:05Z
Releases: 9.4.20
Recurse to sequences on ownership change for all relkinds

When a table ownership is changed, we must apply that also to any owned
sequences.  (Otherwise, it would result in a situation that cannot be
restored, because linked sequences must have the same owner as the
table.)  But this was previously only applied to regular tables and
materialized views.  But it should also apply to at least foreign
tables.  This patch removes the relkind check altogether, because it
doesn't save very much and just introduces the possibility of similar
omissions.

Bug: #15238
Reported-by: Christoph Berg <christoph.berg@credativ.de>

Files

PathChange+/−
src/backend/commands/tablecmds.c modified +6 −10