Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit030da9b

Browse files
committed
Revert "Fix psql's single transaction mode on client-side errors with -c/-f switches".
This reverts commitsa04ccf6 et al. in the back branches only.There was some disagreement already over whether to back-patch157f873, on the grounds that it is the sort of behavioralchange that we don't like to back-patch. Furthermore, it nowlooks like the logic needs some more work, which we don't havetime for before the upcoming 14.4 release. Revert for now, andperhaps reconsider later.Discussion:https://postgr.es/m/17504-76b68018e130415e@postgresql.org
1 parentd3ef5c3 commit030da9b

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

‎doc/src/sgml/ref/psql-ref.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,8 @@ EOF
592592
<application>psql</application> to issue a <command>BEGIN</command> command
593593
before the first such option and a <command>COMMIT</command> command after
594594
the last one, thereby wrapping all the commands into a single
595-
transaction. If any of the commands fails, a
596-
<command>ROLLBACK</command> command is sent instead. This ensures that
597-
either all the commands complete successfully, or no changes are
598-
applied.
595+
transaction. This ensures that either all the commands complete
596+
successfully, or no changes are applied.
599597
</para>
600598

601599
<para>

‎src/bin/psql/startup.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,7 @@ main(int argc, char *argv[])
416416

417417
if (options.single_txn)
418418
{
419-
res=PSQLexec((successResult==EXIT_SUCCESS) ?
420-
"COMMIT" :"ROLLBACK");
421-
if (res==NULL)
419+
if ((res=PSQLexec("COMMIT"))==NULL)
422420
{
423421
if (pset.on_error_stop)
424422
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp