remove duplicate ereport to make the code neat
@@ -4643,12 +4643,7 @@ BeginTransactionBlock(void)
case TBLOCK_SUBINPROGRESS:
case TBLOCK_ABORT:
case TBLOCK_SUBABORT:
- if (Gp_role == GP_ROLE_EXECUTE)
- ereport(DEBUG1,
- (errcode(ERRCODE_ACTIVE_SQL_TRANSACTION),
- errmsg("there is already a transaction in progress")));
- else
- ereport(WARNING,
+ ereport(Gp_role == GP_ROLE_EXECUTE ? DEBUG1 : WARNING,
(errcode(ERRCODE_ACTIVE_SQL_TRANSACTION),
errmsg("there is already a transaction in progress")));
break;
