index->rd_opcintype[i],
index->rd_opcintype[i],
ii->ii_UniqueStrats[i]);
+ if (!OidIsValid(ii->ii_UniqueOps[i]))
+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
+ ii->ii_UniqueStrats[i], index->rd_opcintype[i],
+ index->rd_opcintype[i], index->rd_opfamily[i]);
ii->ii_UniqueProcs[i] = get_opcode(ii->ii_UniqueOps[i]);
}
}
key->partopcintype[col],
key->partopcintype[col],
strategy);
+ if (!OidIsValid(operoid))
+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
+ strategy, key->partopcintype[col], key->partopcintype[col],
+ key->partopfamily[col]);
*need_relabel = true;
}
else
*need_relabel = false;
- if (!OidIsValid(operoid))
- elog(ERROR, "could not find operator for partitioning");
-
return operoid;
}
lefttype,
righttype,
BTORDER_PROC);
+ if (!OidIsValid(proc))
+ elog(ERROR, "missing support function %d(%u,%u) in opfamily %u",
+ BTORDER_PROC, lefttype, righttype, opfamily);
/* Set up the primary fmgr lookup information */
finfo = palloc0(sizeof(FmgrInfo));
operator = get_opfamily_member(opfamily, optype,
optype,
BTEqualStrategyNumber);
-
if (!OidIsValid(operator))
- elog(ERROR, "could not find member %d(%u,%u) of opfamily %u",
+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
BTEqualStrategyNumber, optype, optype, opfamily);
regop = get_opcode(operator);
op_lefttype,
op_righttype,
BTORDER_PROC);
+ if (!RegProcedureIsValid(opfuncid))
+ elog(ERROR, "missing support function %d(%u,%u) in opfamily %u",
+ BTORDER_PROC, op_lefttype, op_righttype, opfamily);
inputcollation = lfirst_oid(collids_cell);
collids_cell = lnext(collids_cell);
expr_op = get_opfamily_member(opfam, lefttype, righttype,
op_strategy);
if (!OidIsValid(expr_op)) /* should not happen */
- elog(ERROR, "could not find member %d(%u,%u) of opfamily %u",
+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
op_strategy, lefttype, righttype, opfam);
if (!var_on_left)
{
expr_op = get_commutator(expr_op);
if (!OidIsValid(expr_op)) /* should not happen */
- elog(ERROR, "could not find commutator of member %d(%u,%u) of opfamily %u",
+ elog(ERROR, "could not find commutator of operator %d(%u,%u) of opfamily %u",
op_strategy, lefttype, righttype, opfam);
}
new_ops = lappend_oid(new_ops, expr_op);
opcintype,
BTEqualStrategyNumber);
if (!OidIsValid(equality_op)) /* shouldn't happen */
- elog(ERROR, "could not find equality operator for opfamily %u",
- opfamily);
+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
+ BTEqualStrategyNumber, opcintype, opcintype, opfamily);
opfamilies = get_mergejoin_opfamilies(equality_op);
if (!opfamilies) /* certainly should find some */
elog(ERROR, "could not find opfamilies for equality operator %u",
exprtype,
pathkey->pk_strategy);
if (!OidIsValid(sortop))
- elog(ERROR, "failed to find sort operator for ORDER BY expression");
+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
+ pathkey->pk_strategy, exprtype, exprtype, pathkey->pk_opfamily);
indexorderbyops = lappend_oid(indexorderbyops, sortop);
}
}
pk_datatype,
pathkey->pk_strategy);
if (!OidIsValid(sortop)) /* should not happen */
- elog(ERROR, "could not find member %d(%u,%u) of opfamily %u",
+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
pathkey->pk_strategy, pk_datatype, pk_datatype,
pathkey->pk_opfamily);
pk_datatype,
BTEqualStrategyNumber);
if (!OidIsValid(eqop)) /* should not happen */
- elog(ERROR, "could not find member %d(%u,%u) of opfamily %u",
+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
BTEqualStrategyNumber, pk_datatype, pk_datatype,
pathkey->pk_opfamily);
opclassform->opcintype,
opclassform->opcintype,
BTORDER_PROC);
+ if (!OidIsValid(funcid)) /* should not happen */
+ elog(ERROR, "missing support function %d(%u,%u) in opfamily %u",
+ BTORDER_PROC, opclassform->opcintype, opclassform->opcintype,
+ opclassform->opcfamily);
fmgr_info(funcid, &key->partsupfunc[i]);