Re: postgres_fdw: Handle boolean comparison predicates
От | Cary Huang |
---|---|
Тема | Re: postgres_fdw: Handle boolean comparison predicates |
Дата | |
Msg-id | 162948799238.22084.17682262819167731211.pgcf@coridan.postgresql.org обсуждение исходный текст |
Ответ на | Re: postgres_fdw: Handle boolean comparison predicates (Ronan Dunklau <ronan.dunklau@aiven.io>) |
Ответы |
Re: postgres_fdw: Handle boolean comparison predicates
|
Список | pgsql-hackers |
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation: not tested Hello I tried to apply the patch to master branch and got a couple of errors, so I think the patch needs a rebase. I also agree with Ashutosh that the "IS NOT TRUE" case can be simplified to just "IS FALSE". it's simpler to understand. based on this, I think we should restructure the switch-case statement in deparseBooleanTest because some of the cases inthere evaluate to the same result but handles differently. For example, "IS TRUE" and "IS NOT FALSE" both evaluate to true, so can be handled in the same way something like: switch (node->booltesttype) { case IS_TRUE: case IS_NOT_FALSE: appendStringInfoChar(buf, '('); deparseExpr(node->arg, context); appendStringInfoString(buf, ")"); break; case IS_FALSE: case IS_NOT_TRUE: appendStringInfoChar(buf, '('); deparseExpr(node->arg, context); appendStringInfoString(buf, " IS FALSE)"); break; case IS_UNKNOWN: appendStringInfoChar(buf, '('); deparseExpr(node->arg, context); appendStringInfoString(buf, " IS NULL)"); break; case IS_NOT_UNKNOWN: appendStringInfoChar(buf, '('); deparseExpr(node->arg, context); appendStringInfoString(buf, " IS NOT NULL)"); break; } just a thought thanks! ------------------------------- Cary Huang HighGo Software Canada www.highgo.ca
В списке pgsql-hackers по дате отправления: