pgsql: Recurse to sequences on ownership change for all relkinds - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Recurse to sequences on ownership change for all relkinds
Date
Msg-id E1g5Evx-0007dR-LZ@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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>

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bdf11d6889610061b2723496bf759f76a136f6f3

Modified Files
--------------
src/backend/commands/tablecmds.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pgsql: Incorporate strerror_r() into src/port/snprintf.c, too.
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Incorporate strerror_r() into src/port/snprintf.c, too.