From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: pg_dump: Refactor code that constructs ALTER ... OWNER TO comman |
Date: | 2022-11-02 21:29:33 |
Message-ID: | E1oqLIj-0009ut-Dg@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(dot)huinker(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/0a00f923-599a-381b-923f-0d802a727715(at)enterprisedb(dot)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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-11-02 21:37:40 | pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi |
Previous Message | Tom Lane | 2022-11-02 16:29:59 | pgsql: Defend against unsupported partition relkind in logical replicat |