mirror of https://github.com/citusdata/citus.git
Removes support for postfix operators from ruleutils_14.c
Relevant PG commit: 1ed6b895634ce0dc5fd4bd040e87252b32182cbapg14_support_after_rebase
parent
be971a8cc9
commit
59624c195a
|
@ -6171,35 +6171,14 @@ get_oper_expr(OpExpr *expr, deparse_context *context)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* unary operator --- but which side? */
|
/* prefix operator */
|
||||||
Node *arg = (Node *) linitial(args);
|
Node *arg = (Node *) linitial(args);
|
||||||
HeapTuple tp;
|
|
||||||
Form_pg_operator optup;
|
|
||||||
|
|
||||||
tp = SearchSysCache1(OPEROID, ObjectIdGetDatum(opno));
|
|
||||||
if (!HeapTupleIsValid(tp))
|
|
||||||
elog(ERROR, "cache lookup failed for operator %u", opno);
|
|
||||||
optup = (Form_pg_operator) GETSTRUCT(tp);
|
|
||||||
switch (optup->oprkind)
|
|
||||||
{
|
|
||||||
case 'l':
|
|
||||||
appendStringInfo(buf, "%s ",
|
appendStringInfo(buf, "%s ",
|
||||||
generate_operator_name(opno,
|
generate_operator_name(opno,
|
||||||
InvalidOid,
|
InvalidOid,
|
||||||
exprType(arg)));
|
exprType(arg)));
|
||||||
get_rule_expr_paren(arg, context, true, (Node *) expr);
|
get_rule_expr_paren(arg, context, true, (Node *) expr);
|
||||||
break;
|
|
||||||
case 'r':
|
|
||||||
get_rule_expr_paren(arg, context, true, (Node *) expr);
|
|
||||||
appendStringInfo(buf, " %s",
|
|
||||||
generate_operator_name(opno,
|
|
||||||
exprType(arg),
|
|
||||||
InvalidOid));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
elog(ERROR, "bogus oprkind: %d", optup->oprkind);
|
|
||||||
}
|
|
||||||
ReleaseSysCache(tp);
|
|
||||||
}
|
}
|
||||||
if (!PRETTY_PAREN(context))
|
if (!PRETTY_PAREN(context))
|
||||||
appendStringInfoChar(buf, ')');
|
appendStringInfoChar(buf, ')');
|
||||||
|
|
Loading…
Reference in New Issue