mirror of
https://github.com/HypoPG/hypopg
synced 2026-05-24 09:38:21 +00:00
Fix support for pg11.
WRT upstream commit 8224de4f42c. For now, explicitly disallow INCLUDE clause for hypothetical index and have set the nkeycolumns equal to ncolumns. A following commit will add proper support for the pg11 INCLUDE feature.
This commit is contained in:
parent
afb56de2e1
commit
6afe828ed5
1 changed files with 9 additions and 0 deletions
9
hypopg.c
9
hypopg.c
|
|
@ -546,6 +546,11 @@ hypo_entry_store_parsetree(IndexStmt *node, const char *queryString)
|
|||
elog(ERROR, "hypopg: cannot use more thant %d columns in an index",
|
||||
INDEX_MAX_KEYS);
|
||||
|
||||
#if PG_VERSION_NUM >= 110000
|
||||
if (node->indexIncludingParams)
|
||||
elog(ERROR, "hypopg: INCLUDE clause is not yet supported.");
|
||||
#endif
|
||||
|
||||
initStringInfo(&indexRelationName);
|
||||
appendStringInfo(&indexRelationName, "%s", node->accessMethod);
|
||||
appendStringInfo(&indexRelationName, "_");
|
||||
|
|
@ -1149,6 +1154,10 @@ hypo_injectHypotheticalIndex(PlannerInfo *root,
|
|||
* relation, TODO */
|
||||
index->rel = rel;
|
||||
index->ncolumns = ncolumns = entry->ncolumns;
|
||||
#if PG_VERSION_NUM >= 110000
|
||||
/* FIXME change this when support for INCLUDE will be added */
|
||||
index->nkeycolumns = ncolumns = entry->ncolumns;
|
||||
#endif
|
||||
|
||||
index->indexkeys = (int *) palloc(sizeof(int) * ncolumns);
|
||||
index->indexcollations = (Oid *) palloc(sizeof(int) * ncolumns);
|
||||
|
|
|
|||
Loading…
Reference in a new issue