public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ashutosh Bapat <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: pg_restore documentation and --create/--single-transaction limitation
Date: Mon, 24 Mar 2025 17:11:45 +0530
Message-ID: <CAExHW5ti5igDwOOde6shgfS7JPtCY9gNrkB3xNr=FuGTYVDSjQ@mail.gmail.com> (raw)
Hi All,
The pg_restore documentation usually mentions the pair of switches
which can not be used together. However, it does not mention that
--create and --single-transaction can not be used together. Here's a
patch fixing the same.
Looking for a precedence, I found that we have mentioned a similar
limitation concerning --data-only and --schema-only only under
--schema and not at both the sections. Maybe it's missing or we chose
to mention it only at one place. But then I am not sure which one
place I should use to mention the new limitation. So, I have added the
note in the sections corresponding to both the switches so that a user
reading either of them knows about the limitation.
--
Best Wishes,
Ashutosh Bapat
Attachments:
[text/x-patch] 0001-pg_restore-documentation-correction-20250324.patch (1.5K, 2-0001-pg_restore-documentation-correction-20250324.patch)
download | inline diff:
From e9efa27688cb0f85825fd7cda02118818a1edeae Mon Sep 17 00:00:00 2001
From: Ashutosh Bapat <[email protected]>
Date: Mon, 24 Mar 2025 16:59:16 +0530
Subject: [PATCH] pg_restore documentation correction
--create and --single-transaction switches cannot be specified together. But
--pg_restore documentation does not mention this. Fix the documentation.
Author: Ashutosh Bapat
---
doc/src/sgml/ref/pg_restore.sgml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml
index 35140187807..1ae28cb8efb 100644
--- a/doc/src/sgml/ref/pg_restore.sgml
+++ b/doc/src/sgml/ref/pg_restore.sgml
@@ -148,6 +148,10 @@ PostgreSQL documentation
<command>CREATE DATABASE</command> commands. All data is restored into the
database name that appears in the archive.
</para>
+
+ <para>
+ This option cannot be used with <option>--single-transaction</option>.
+ </para>
</listitem>
</varlistentry>
@@ -618,7 +622,8 @@ PostgreSQL documentation
emitted commands in <command>BEGIN</command>/<command>COMMIT</command>). This
ensures that either all the commands complete successfully, or no
changes are applied. This option implies
- <option>--exit-on-error</option>.
+ <option>--exit-on-error</option>. This option cannot be used with
+ <option>--create</option>.
</para>
</listitem>
</varlistentry>
base-commit: 19c6eb06c51f4da70e2ea0f1bdb64a0142e8e2aa
--
2.34.1
view thread (6+ 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]
Subject: Re: pg_restore documentation and --create/--single-transaction limitation
In-Reply-To: <CAExHW5ti5igDwOOde6shgfS7JPtCY9gNrkB3xNr=FuGTYVDSjQ@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