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

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dump: Refactor code that constructs ALTER ... OWNER TO commands
Date: 2022-10-24 09:54:28
Message-ID: 0a00f923-599a-381b-923f-0d802a727715@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Attachment Content-Type Size
0001-pg_dump-Refactor-code-that-constructs-ALTER-.-OWNER-.patch text/plain 8.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-10-24 09:56:21 Re: Question about savepoint level?
Previous Message Alvaro Herrera 2022-10-24 09:39:19 Re: Crash after a call to pg_backup_start()