mirror of
https://github.com/HypoPG/hypopg
synced 2026-05-24 09:38:21 +00:00
Fix compatibility with pg12 (commit fdba460a26a)
Also fix a warning for an unused variable with version prior pg10
This commit is contained in:
parent
0f1e6bd9c5
commit
33ea28b538
2 changed files with 8 additions and 2 deletions
4
hypopg.c
4
hypopg.c
|
|
@ -464,8 +464,10 @@ hypo_get_relation_info_hook(PlannerInfo *root,
|
|||
bool inhparent,
|
||||
RelOptInfo *rel)
|
||||
{
|
||||
bool hypopart = false;
|
||||
Relation relation;
|
||||
#if PG_VERSION_NUM >= 100000
|
||||
bool hypopart = false;
|
||||
#endif
|
||||
|
||||
if (HYPO_ENABLED())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -419,7 +419,11 @@ transformPartitionSpec(Relation rel, PartitionSpec *partspec, char *strategy)
|
|||
* rangetable entry. We need a ParseState for transformExpr.
|
||||
*/
|
||||
pstate = make_parsestate(NULL);
|
||||
rte = addRangeTableEntryForRelation(pstate, rel, NULL, false, true);
|
||||
rte = addRangeTableEntryForRelation(pstate, rel,
|
||||
#if PG_VERSION_NUM >= 120000
|
||||
AccessShareLock,
|
||||
#endif
|
||||
NULL, false, true);
|
||||
addRTEtoQuery(pstate, rte, true, true, true);
|
||||
|
||||
/* take care of any partition expressions */
|
||||
|
|
|
|||
Loading…
Reference in a new issue