Removes support for postfix operators from ruleutils_14.c

Relevant PG commit:
1ed6b895634ce0dc5fd4bd040e87252b32182cba
pg14_support_after_rebase
Halil Ozan Akgul 2021-08-16 11:14:09 +03:00 committed by Sait Talha Nisanci
parent be971a8cc9
commit 59624c195a
1 changed files with 6 additions and 27 deletions

View File

@ -6171,35 +6171,14 @@ get_oper_expr(OpExpr *expr, deparse_context *context)
}
else
{
/* unary operator --- but which side? */
/* prefix operator */
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 ",
generate_operator_name(opno,
InvalidOid,
exprType(arg)));
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);
appendStringInfo(buf, "%s ",
generate_operator_name(opno,
InvalidOid,
exprType(arg)));
get_rule_expr_paren(arg, context, true, (Node *) expr);
}
if (!PRETTY_PAREN(context))
appendStringInfoChar(buf, ')');