Get the integer comparison ops from the catalog

pull/896/head
Onder Kalaci 2016-10-19 17:41:24 +03:00
parent c0603a51c5
commit 829ed1ef5d
1 changed files with 8 additions and 3 deletions

View File

@ -17,6 +17,7 @@
#include "access/stratnum.h" #include "access/stratnum.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/pg_opfamily.h"
#include "distributed/citus_clauses.h" #include "distributed/citus_clauses.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "distributed/colocation_utils.h" #include "distributed/colocation_utils.h"
@ -2503,9 +2504,13 @@ InstantiatePartitionQual(Node *node, void *context)
List *hashedOperatorList = NIL; List *hashedOperatorList = NIL;
/* TODO: how can I get those ids */ /* get the integer >=, <= operators from the catalog */
Oid integer4GEoperatorId = 525; Oid integer4GEoperatorId = get_opfamily_member(INTEGER_BTREE_FAM_OID, INT4OID,
Oid integer4LEoperatorId = 523; INT4OID,
BTGreaterEqualStrategyNumber);
Oid integer4LEoperatorId = get_opfamily_member(INTEGER_BTREE_FAM_OID, INT4OID,
INT4OID,
BTLessEqualStrategyNumber);
/* look for the Params */ /* look for the Params */
if (IsA(leftop, Param)) if (IsA(leftop, Param))