pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_dump: Refactor code that constructs ALTER ... OWNER TO comman
Date: Wed, 02 Nov 2022 21:29:33 +0000
Message-ID: <E1oqLIj-0009ut-Dg@gemulon.postgresql.org> (raw)

pg_dump: Refactor code that constructs ALTER ... OWNER TO commands

Avoid having to list all the possible object types twice.  Instead,
only _getObjectDescription() needs to know about specific object
types.  It communicates back to _printTocEntry() whether an owner is
to be set.

In passing, remove the logic to use ALTER TABLE to set the owner of
views and sequences.  This is no longer necessary.  Furthermore, if
pg_dump doesn't recognize the object type, this is now a fatal error,
not a warning.

Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/0a00f923-599a-381b-923f-0d802a727715@enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3655b46aa0b8156aced0b9ee3d10875632f84407

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 130 +++++++++++++----------------------
1 file changed, 47 insertions(+), 83 deletions(-)



Message-ID: <E1oqLIj-0009ut-Dg@gemulon.postgresql.org>
Permalink:  ../E1oqLIj-0009ut-Dg@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oqLIj-0009ut-Dg@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: pg_dump: Refactor code that constructs ALTER ... OWNER TO comman
  In-Reply-To: <E1oqLIj-0009ut-Dg@gemulon.postgresql.org>
  References: <E1oqLIj-0009ut-Dg@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox