Re: Set AUTOCOMMIT to on in script output by pg_dump

2025-01-26 Thread Shinya Kato
On 2025-01-26 02:45, Tom Lane wrote: Robert Treat writes: On Wed, Jan 22, 2025 at 8:02 AM Shinya Kato wrote: I agree to it and fixed the patch. LGTM LGTM too. Pushed with a couple of very minor tweaks. regards, tom lane Thank you for pushing! -- Regards, Shin

Re: Set AUTOCOMMIT to on in script output by pg_dump

2025-01-25 Thread Tom Lane
Robert Treat writes: > On Wed, Jan 22, 2025 at 8:02 AM Shinya Kato > wrote: >> I agree to it and fixed the patch. > LGTM LGTM too. Pushed with a couple of very minor tweaks. regards, tom lane

Re: Set AUTOCOMMIT to on in script output by pg_dump

2025-01-22 Thread Robert Treat
On Wed, Jan 22, 2025 at 8:02 AM Shinya Kato wrote: > > Hi, thank you for the reviews. > > On 2025-01-18 00:45, Robert Treat wrote: > > 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

Re: Set AUTOCOMMIT to on in script output by pg_dump

2025-01-22 Thread Shinya Kato
Hi, thank you for the reviews. On 2025-01-18 00:45, Robert Treat wrote: 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

Re: Set AUTOCOMMIT to on in script output by pg_dump

2025-01-17 Thread Tom Lane
Robert Treat writes: > suggested diffs attached, let me know if you would like a consolidated patch Sadly, the cfbot is now confused since it doesn't understand the idea of an incremental patch. Somebody please post a consolidated patch. For myself, I'd suggest writing the examples with -X not

Re: Set AUTOCOMMIT to on in script output by pg_dump

2025-01-17 Thread Robert Treat
On Thu, Oct 10, 2024 at 1:56 AM Shinya Kato wrote: > Thank you all for the comments! > 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, si

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-16 Thread Shinya Kato
On 2024-10-10 14:56, Shinya Kato wrote: A new patch is attached. I am not a native English, so corrections to the texts are welcome. I created a commit fest entry. https://commitfest.postgresql.org/50/5306/ -- Regards, Shinya Kato NTT DATA GROUP CORPORATION

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-09 Thread Shinya Kato
Thank you all for the comments! On 2024-10-09 15:15, Yugo Nagata wrote: On Tue, 8 Oct 2024 21:37:38 -0700 "David G. Johnston" wrote: On Tuesday, October 8, 2024, Tom Lane wrote: > "David G. Johnston" writes: > > On Tuesday, October 8, 2024, Yugo Nagata wrote: > >> On Wed, 09 Oct 2024 11:1

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Yugo Nagata
On Tue, 8 Oct 2024 21:37:38 -0700 "David G. Johnston" wrote: > On Tuesday, October 8, 2024, Tom Lane wrote: > > > "David G. Johnston" writes: > > > On Tuesday, October 8, 2024, Yugo Nagata wrote: > > >> On Wed, 09 Oct 2024 11:10:37 +0900 > > >> Shinya Kato wrote: > > >>> When SQL scripts cre

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread David G. Johnston
On Tuesday, October 8, 2024, Tom Lane wrote: > "David G. Johnston" writes: > > On Tuesday, October 8, 2024, Yugo Nagata wrote: > >> On Wed, 09 Oct 2024 11:10:37 +0900 > >> Shinya Kato wrote: > >>> When SQL scripts created with pg_dump/pg_dumpall/pg_restore are > executed > >>> in psql with AUT

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Tom Lane
"David G. Johnston" writes: > On Tuesday, October 8, 2024, Yugo Nagata wrote: >> On Wed, 09 Oct 2024 11:10:37 +0900 >> Shinya Kato wrote: >>> When SQL scripts created with pg_dump/pg_dumpall/pg_restore are executed >>> in psql with AUTOCOMMIT turned off, they will not succeed in many cases. > A

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Tatsuo Ishii
>> I am not sure if it is good to include psql's meta-command in >> pg_dump/pg_dumpall >> results. Can we assume users will always use psql to restore the pg_dump >> results? > > > Agreed. If we aren’t already outputting psql-only stuff I am a strong -1 > for making this the first such case. I

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread David G. Johnston
On Tuesday, October 8, 2024, Yugo Nagata wrote: > On Wed, 09 Oct 2024 11:10:37 +0900 > Shinya Kato wrote: > > > Hi hackers! > > > > When SQL scripts created with pg_dump/pg_dumpall/pg_restore are executed > > in psql with AUTOCOMMIT turned off, they will not succeed in many cases. > > This is be

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Yugo Nagata
On Wed, 09 Oct 2024 11:10:37 +0900 Shinya Kato wrote: > Hi hackers! > > When SQL scripts created with pg_dump/pg_dumpall/pg_restore are executed > in psql with AUTOCOMMIT turned off, they will not succeed in many cases. > This is because the script contains SQL statements that cannot be > exec

Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Shinya Kato
e5b4a6ab95ab5c798ef8c7f7062fb764a74de37a Mon Sep 17 00:00:00 2001 From: Shinya Kato Date: Wed, 9 Oct 2024 10:28:31 +0900 Subject: [PATCH v1] Set AUTOCOMMIT to on in script output by pg_dump --- src/bin/pg_dump/pg_backup_archiver.c | 7 +++ src/bin/pg_dump/pg_dumpall.c | 6 ++ 2 files changed, 13