diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-06-10 16:34:25 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-06-10 16:34:25 -0400 |
commit | 3f7f06738529f4a71cf33c79654954e6178972a1 (patch) | |
tree | b2d6c92274394954c16c399ba10584f27d1c5448 /src | |
parent | 254cd7f31f60f02de0548c8dcdc2c402c0cf02d8 (diff) | |
download | postgresql-3f7f06738529f4a71cf33c79654954e6178972a1.tar.gz postgresql-3f7f06738529f4a71cf33c79654954e6178972a1.zip |
Revert "Fix psql's single transaction mode on client-side errors with -c/-f switches".
This reverts commits a04ccf6df et al. in the back branches only.
There was some disagreement already over whether to back-patch
157f8739a, on the grounds that it is the sort of behavioral
change that we don't like to back-patch. Furthermore, it now
looks like the logic needs some more work, which we don't have
time for before the upcoming 14.4 release. Revert for now, and
perhaps reconsider later.
Discussion: https://postgr.es/m/17504-76b68018e130415e@postgresql.org
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/startup.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index ce180e1cd7b..392b96eb862 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -412,9 +412,7 @@ main(int argc, char *argv[]) if (options.single_txn) { - res = PSQLexec((successResult == EXIT_SUCCESS) ? - "COMMIT" : "ROLLBACK"); - if (res == NULL) + if ((res = PSQLexec("COMMIT")) == NULL) { if (pset.on_error_stop) { |