public inbox for [email protected]  
help / color / mirror / Atom feed
From: Robert Treat <[email protected]>
To: Shinya Kato <[email protected]>
Cc: Yugo Nagata <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Set AUTOCOMMIT to on in script output by pg_dump
Date: Fri, 17 Jan 2025 10:45:46 -0500
Message-ID: <CABV9wwM4vzO2BYDgw0N9Yd6TTrmrvT+eLrSfWE2z7Ra3CQtdXA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<CAKFQuwbnNfH0RYcDnwYkhbXi_VK+yKHaMGvRP9J1vFrLHnze0w@mail.gmail.com>
	<[email protected]>
	<CAKFQuwZ8H9erEpDXO=ucgSLbMJfutZf+d=WQXWoJiB2ziD_Xpg@mail.gmail.com>
	<[email protected]>
	<[email protected]>

On Thu, Oct 10, 2024 at 1:56 AM Shinya Kato
<[email protected]> wrote:
> Thank you all for the comments!
<snip>
> While adding to the documentation is sufficient if users use it
> correctly, users often behave unexpectedly. My intention was to
> implement it in a way that works without issues even if misused.
> However, since the prevailing opinion seems to favor simply updating the
> documentation, I will proceed with that approach.
>
> A new patch is attached.
> I am not a native English, so corrections to the texts are welcome.
>

This looks pretty good to me. I think there are a couple of minor
grammar changes that could be made, and I think the pg_dumpall section
could use a couple tweaks, specifically 1) not all incantations of
pg_dumpall emit psql meta commands (-g comes to mind quickly) and ISTR
some non-psql clients honor psql meta commands, so I would lessen the
language around incompatibility, and 2) I think adding an explicit -f
for the database name in the pg_dumpall is clearer, and mirrors the
pg_dump example.

suggested diffs attached, let me know if you would like a consolidated patch


Robert Treat
https://xzilla.net


Attachments:

  [application/octet-stream] xzilla-pg_dump-no-psqlrc.diff (2.2K, ../CABV9wwM4vzO2BYDgw0N9Yd6TTrmrvT+eLrSfWE2z7Ra3CQtdXA@mail.gmail.com/2-xzilla-pg_dump-no-psqlrc.diff)
  download | inline diff:
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 21ad34f4e0..15c8cdb8aa 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -106,7 +106,7 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
 
    <para>
     Text files created by <application>pg_dump</application> are intended to
-    be read in by the <application>psql</application> program with its default
+    be read in by the <application>psql</application> program using its default
     settings. The general command form to restore a dump is
 <synopsis>
 psql --no-psqlrc <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class="parameter">dumpfile</replaceable>
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index 9208387ec1..636c27fe17 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -823,8 +823,8 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
    when restoring a database from a <application>pg_dumpall</application> script
    to ensure a clean restore process and prevent potential conflicts with
    existing <application>psql</application> configurations. Additionally,
-   because the script includes <application>psql</application> meta-commands,
-   it is incompatible with clients other than <application>psql</application>.
+   because the script can include <application>psql</application> meta-commands,
+   it may be incompatible with clients other than <application>psql</application>.
   </para>
  </refsect1>
 
@@ -842,9 +842,9 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
   <para>
    To restore database(s) from this file, you can use:
 <screen>
-<prompt>$</prompt> <userinput>psql --no-psqlrc -f db.out postgres</userinput>
+<prompt>$</prompt> <userinput>psql --no-psqlrc -f db.out -d postgres</userinput>
 </screen>
-   It is not important to which database you connect here since the
+   It is not important which database you connect to here since the
    script file created by <application>pg_dumpall</application> will
    contain the appropriate commands to create and connect to the saved
    databases.  An exception is that if you specified <option>--clean</option>,


view thread (15+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Set AUTOCOMMIT to on in script output by pg_dump
  In-Reply-To: <CABV9wwM4vzO2BYDgw0N9Yd6TTrmrvT+eLrSfWE2z7Ra3CQtdXA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox