pg_dump: Refactor code that constructs ALTER ... OWNER TO commands
Peter Eisentraut <peter@eisentraut.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/pg_backup_archiver.c | modified | +47 −83 |
Discussion
- pg_dump: Refactor code that constructs ALTER ... OWNER TO commands 4 messages · 2022-10-24 → 2022-11-05