diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index bb89cce8cb..c15303c7bb 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -1559,7 +1559,8 @@ exec_bind_message(StringInfo input_message) * functions. */ if (IsAbortedTransactionBlockState() && - (!IsTransactionExitStmt(psrc->raw_parse_tree->stmt) || + (!(psrc->raw_parse_tree && + IsTransactionExitStmt(psrc->raw_parse_tree->stmt)) || numParams != 0)) ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION),