Removes support for postfix operators from ruleutils_14.c

Relevant PG commit:
1ed6b895634ce0dc5fd4bd040e87252b32182cba
talha_pg14_support
Halil Ozan Akgul 2021-08-16 11:14:09 +03:00 committed by Sait Talha Nisanci
parent 90baf6018b
commit 62d3cecb06
1 changed files with 6 additions and 27 deletions

View File

@ -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, ')');