How to make a OpExpr check compatible among different versions
Andy Fan <[email protected]> Mon, 13 Jan 2020 15:29:27 +0800
| Newsgroups | gmane.comp.db.postgresql.devel.general |
|---|---|
| Message-ID | <CAKU4AWqrv8AZQFi7x2O2cME2ifDw18ZDRzuQnMgWwiXyJo_RfQ@mail.gmail.com> |
During one of my works for logical rewrite, I want to check if the expr is
a given Expr.
so the simplest way is:
if (expr->opno == 418 && nodeTag(linitial(expr->args)) == T_xxx &&
nodeTag(lsecond(expr->args)) == T_yyyy )
{
..
}
if we write code like above, we may have issues if the oid changed in the
future version.
so what would be your suggestion?
Thanks