1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +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

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.72 2004/07/10 15:51:28 momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.73 2004/07/13 02:59:49 momjian Exp $
PostgreSQL documentation
-->
@ -464,10 +464,10 @@ PostgreSQL documentation
<term><option>--use-set-session-authorization</></term>
<listitem>
<para>
This option is obsolete but still accepted for backwards
compatibility.
<application>pg_dump</application> now always behaves in the
way formerly selected by this option.
Output SQL standard SET SESSION AUTHORIZATION commands instead
of OWNER TO commands. This makes the dump more standards compatible,
but depending on the history of the objects in the dump, may not
restore properly.
</para>
</listitem>
</varlistentry>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.46 2004/02/17 09:07:16 neilc Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.47 2004/07/13 02:59:49 momjian Exp $ -->
<refentry id="APP-PGRESTORE">
<refmeta>
@ -337,10 +337,10 @@
<term><option>--use-set-session-authorization</option></term>
<listitem>
<para>
This option is obsolete but still accepted for backwards
compatibility.
<application>pg_restore</application> now always behaves in the
way formerly selected by this option.
Output SQL standard SET SESSION AUTHORIZATION commands instead
of OWNER TO commands. This makes the dump more standards compatible,
but depending on the history of the objects in the dump, may not
restore properly.
</para>
</listitem>
</varlistentry>