11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.64 2003/09/11 21:42:20 momjian Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.65 2003/09/23 22:48:53 tgl Exp $
33PostgreSQL documentation
44-->
55
@@ -318,16 +318,16 @@ PostgreSQL documentation
318318 <term><option>--no-owner</option></term>
319319 <listitem>
320320 <para>
321- Do not output commands to set the
322- object ownership to match the original database. Typically,
323- <application>pg_dump</application> issues
324- (<application>psql</application>-specific) < command>\connect </command>
325- statements to set ownership of schema elements. See also
326- under <option>-R</option> and <option>-X
327- use-set-session-authorization</option>. Note that
328- <option>-O</option> does not prevent all reconnections to the
329- database, only the ones that are exclusively used for
330- ownership adjustments .
321+ Do not output commands to set
322+ ownership of objects to match the original database.
323+ By default, <application>pg_dump</application> issues
324+ < command>SET SESSION AUTHORIZATION </command>
325+ statements to set ownership of created schema elements.
326+ These statements
327+ will fail when the script is run unless it is started by a superuser
328+ (or the same user that owns all of the objects in the script).
329+ To make a script that can be restored by any user, but will give
330+ that user ownership of all the objects, specify <option>-O</> .
331331 </para>
332332
333333 <para>
@@ -343,27 +343,8 @@ PostgreSQL documentation
343343 <term><option>--no-reconnect</option></term>
344344 <listitem>
345345 <para>
346- Prohibit <application>pg_dump</application>
347- from outputting a script that would require reconnections to
348- the database while being restored. An average restoration
349- script usually has to reconnect several times as different
350- users to set the original ownerships of the objects. This
351- option is a rather blunt instrument because it makes
352- <application>pg_dump</application> lose this ownership information,
353- <emphasis>unless</emphasis> you use the <option>-X
354- use-set-session-authorization</option> option.
355- </para>
356-
357- <para>
358- One possible reason why reconnections during restore might not
359- be desired is if the access to the database requires manual
360- interaction (e.g., passwords).
361- </para>
362-
363- <para>
364- This option is only meaningful for the plain-text format. For
365- the other formats, you may specify the option when you
366- call <command>pg_restore</command>.
346+ This option is obsolete but still accepted for backwards
347+ compatibility.
367348 </para>
368349 </listitem>
369350 </varlistentry>
@@ -385,8 +366,7 @@ PostgreSQL documentation
385366 <para>
386367 Specify the superuser user name to use when disabling triggers.
387368 This is only relevant if <option>--disable-triggers</> is used.
388- (Usually, it's better to specify
389- <option>--use-set-session-authorization</>, and then start the
369+ (Usually, it's better to leave this out, and instead start the
390370 resulting script as superuser.)
391371 </para>
392372 </listitem>
@@ -444,32 +424,10 @@ PostgreSQL documentation
444424 <term><option>--use-set-session-authorization</></term>
445425 <listitem>
446426 <para>
447- Normally, if a (plain-text mode) script generated by
448- <application>pg_dump</application> must alter the current database
449- user (e.g., to set correct object ownerships), it uses the
450- <application>psql</application> <command>\connect</command> command.
451- This command actually opens a new connection, which might
452- require manual interaction (e.g., passwords). If you use the
453- <option>-X use-set-session-authorization</option> option, then
454- <application>pg_dump</application> will instead output <xref
455- linkend="sql-set-session-authorization" endterm="sql-set-session-authorization-title"> commands. This has
456- the same effect, but it requires that the user restoring the
457- database from the generated script be a database superuser.
458- This option effectively overrides the <option>-R</option>
459- option.
460- </para>
461-
462- <para>
463- Since <xref linkend="sql-set-session-authorization" endterm="sql-set-session-authorization-title"> is a
464- standard SQL command, whereas <command>\connect</command> only
465- works in <application>psql</application>, this option also enhances
466- the theoretical portability of the output script.
467- </para>
468-
469- <para>
470- This option is only meaningful for the plain-text format. For
471- the other formats, you may specify the option when you
472- call <command>pg_restore</command>.
427+ This option is obsolete but still accepted for backwards
428+ compatibility.
429+ <application>pg_dump</application> now always behaves in the
430+ way formerly selected by this option.
473431 </para>
474432 </listitem>
475433 </varlistentry>
@@ -490,10 +448,8 @@ PostgreSQL documentation
490448 <para>
491449 Presently, the commands emitted for <option>--disable-triggers</>
492450 must be done as superuser. So, you should also specify
493- a superuser name with <option>-S</>, or preferably specify
494- <option>--use-set-session-authorization</> and then be careful to
495- start the resulting script as a superuser. If you give neither
496- option, the entire script must be run as superuser.
451+ a superuser name with <option>-S</>, or preferably be careful to
452+ start the resulting script as a superuser.
497453 </para>
498454
499455 <para>
0 commit comments