Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> xid = HeapTupleHeaderGetRawXmax(tuple);
> ! if (((tuple->t_infomask & HEAP_XMAX_IS_MULTI) &&
> ! MultiXactIdIsValid(xid) &&
> ! MultiXactIdPrecedes(xid, cutoff_multi)) ||
> ! ((!(tuple->t_infomask & HEAP_XMAX_IS_MULTI)) &&
> ! TransactionIdIsNormal(xid) &&
> ! TransactionIdPrecedes(xid, cutoff_xid)))
> {
Would this be clearer as a ternary expression? That is,
if ((tuple->t_infomask & HEAP_XMAX_IS_MULTI) ? (MultiXactIdIsValid(xid) && MultiXactIdPrecedes(xid,
cutoff_multi)): (TransactionIdIsNormal(xid) && TransactionIdPrecedes(xid, cutoff_xid)))
regards, tom lane