How to make a OpExpr check compatible among different versions

Поиск
Список
Период
Сортировка
Искать
От
Andy Fan
Тема
How to make a OpExpr check compatible among different versions
Дата
Msg-id
CAKU4AWqrv8AZQFi7x2O2cME2ifDw18ZDRzuQnMgWwiXyJo_RfQ@mail.gmail.com
Список
Дерево обсуждения
How to make a OpExpr check compatible among different versions Andy Fan <zhihui.fan1213@gmail.com>
Re: How to make a OpExpr check compatible among different versions Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: How to make a OpExpr check compatible among different versions Andy Fan <zhihui.fan1213@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
В списке pgsql-hackers по дате отправления
От: Antonin Houska
Дата:
Сообщение: Comment fix in session.h
От: Konstantin Knizhnik
Дата:
FAQ