--- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -3729,6 +3729,7 @@ (errcode(ERRCODE_NO_ACTIVE_SQL_TRANSACTION), errmsg("there is no transaction in progress"))); s->blockState = TBLOCK_END; + chain = false; /* Do not chain the implicit transaction */ result = true; break; @@ -3798,6 +3799,7 @@ ereport(WARNING, (errcode(ERRCODE_NO_ACTIVE_SQL_TRANSACTION), errmsg("there is no transaction in progress"))); + chain = false; /* Do not chain the implicit transaction */ result = true; break; @@ -3915,6 +3917,7 @@ (errcode(ERRCODE_NO_ACTIVE_SQL_TRANSACTION), errmsg("there is no transaction in progress"))); s->blockState = TBLOCK_ABORT_PENDING; + chain = false; /* Do not chain the implicit transaction */ break; /*