mirror of
https://github.com/HypoPG/hypopg
synced 2026-05-24 09:38:21 +00:00
Use ResolveOpClass for pg10+ instead of imported GetIndexOpClass.
This commit is contained in:
parent
76b9bbbec5
commit
db7c6a38d8
3 changed files with 6 additions and 1 deletions
|
|
@ -632,7 +632,7 @@ hypo_index_store_parsetree(IndexStmt *node, const char *queryString)
|
|||
}
|
||||
|
||||
/* get the opclass */
|
||||
opclass = GetIndexOpClass(attribute->opclass,
|
||||
opclass = ResolveOpClass(attribute->opclass,
|
||||
atttype,
|
||||
node->accessMethod,
|
||||
entry->relam);
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ build_index_tlist(PlannerInfo *root, IndexOptInfo *index,
|
|||
return tlist;
|
||||
}
|
||||
|
||||
#if PG_VERSION_NUM < 100000
|
||||
/*
|
||||
* Copied from src/backend/commands/indexcmds.c, not exported.
|
||||
* Resolve possibly-defaulted operator class specification
|
||||
|
|
@ -214,6 +215,7 @@ GetIndexOpClass(List *opclass, Oid attrType,
|
|||
|
||||
return opClassId;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copied from src/backend/commands/indexcmds.c, not exported.
|
||||
|
|
|
|||
|
|
@ -21,8 +21,11 @@
|
|||
|
||||
extern List *build_index_tlist(PlannerInfo *root, IndexOptInfo *index,
|
||||
Relation heapRelation);
|
||||
#if PG_VERSION_NUM < 100000
|
||||
extern Oid GetIndexOpClass(List *opclass, Oid attrType,
|
||||
char *accessMethodName, Oid accessMethodId);
|
||||
#define ResolveOpClass(o, at, acn, aci) GetIndexOpClass(o, at, acn, aci)
|
||||
#endif
|
||||
|
||||
extern void CheckPredicate(Expr *predicate);
|
||||
extern bool CheckMutability(Expr *expr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue