aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/psql/common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 6f507104f46..925fe34a3fd 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1350,12 +1350,13 @@ SendQuery(const char *query)
/*
* Do nothing if they are messing with savepoints themselves:
- * If the user did RELEASE or ROLLBACK, our savepoint is gone.
- * If they issued a SAVEPOINT, releasing ours would remove
- * theirs.
+ * If the user did COMMIT AND CHAIN, RELEASE or ROLLBACK, our
+ * savepoint is gone. If they issued a SAVEPOINT, releasing
+ * ours would remove theirs.
*/
if (results &&
- (strcmp(PQcmdStatus(results), "SAVEPOINT") == 0 ||
+ (strcmp(PQcmdStatus(results), "COMMIT") == 0 ||
+ strcmp(PQcmdStatus(results), "SAVEPOINT") == 0 ||
strcmp(PQcmdStatus(results), "RELEASE") == 0 ||
strcmp(PQcmdStatus(results), "ROLLBACK") == 0))
svptcmd = NULL;