1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Change pg_dump to use ALTER OWNER commands instead of SET SESSION

AUTHORIZATION commands by default.  Move all GRANT and REVOKE commands
to the end of the dump to avoid restore failures in several situations.
Bring back --use-set-session-authorization option to get previous SET
behaviour

Christopher Kings-Lyne
This commit is contained in:
Bruce Momjian
2004-07-13 03:00:17 +00:00
parent e419c84c56
commit dc0e76ca36
6 changed files with 168 additions and 48 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup.h,v 1.30 2004/04/22 02:39:09 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup.h,v 1.31 2004/07/13 03:00:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -73,6 +73,7 @@ typedef struct _restoreOptions
int noOwner; /* Don't try to match original object owner */
int disable_triggers; /* disable triggers during
* data-only restore */
int use_setsessauth; /* Use SET SESSION AUTHORIZATION commands instead of OWNER TO */
char *superuser; /* Username to use as superuser */
int dataOnly;
int dropSchema;