mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 21:56:53 +02:00
Revert "Fix psql's single transaction mode on client-side errors with -c/-f switches".
This reverts commitsa04ccf6df
et al. in the back branches only. There was some disagreement already over whether to back-patch157f8739a
, 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
This commit is contained in:
parent
254cd7f31f
commit
3f7f067385
@ -591,10 +591,8 @@ EOF
|
|||||||
<application>psql</application> to issue a <command>BEGIN</command> command
|
<application>psql</application> to issue a <command>BEGIN</command> command
|
||||||
before the first such option and a <command>COMMIT</command> command after
|
before the first such option and a <command>COMMIT</command> command after
|
||||||
the last one, thereby wrapping all the commands into a single
|
the last one, thereby wrapping all the commands into a single
|
||||||
transaction. If any of the commands fails, a
|
transaction. This ensures that either all the commands complete
|
||||||
<command>ROLLBACK</command> command is sent instead. This ensures that
|
successfully, or no changes are applied.
|
||||||
either all the commands complete successfully, or no changes are
|
|
||||||
applied.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -412,9 +412,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (options.single_txn)
|
if (options.single_txn)
|
||||||
{
|
{
|
||||||
res = PSQLexec((successResult == EXIT_SUCCESS) ?
|
if ((res = PSQLexec("COMMIT")) == NULL)
|
||||||
"COMMIT" : "ROLLBACK");
|
|
||||||
if (res == NULL)
|
|
||||||
{
|
{
|
||||||
if (pset.on_error_stop)
|
if (pset.on_error_stop)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user