WRITE_UINT_FIELD(pages);
WRITE_FLOAT_FIELD(tuples, "%.0f");
WRITE_INT_FIELD(ncolumns);
+ WRITE_OID_FIELD(relam);
WRITE_NODE_FIELD(indexprs);
WRITE_NODE_FIELD(indpred);
WRITE_BOOL_FIELD(predOK);
WRITE_BOOL_FIELD(unique);
+ WRITE_BOOL_FIELD(hypothetical);
}
static void
ChangeVarNodes((Node *) info->indpred, 1, varno, 0);
info->predOK = false; /* set later in indxpath.c */
info->unique = index->indisunique;
+ info->hypothetical = false;
/*
* Estimate the index size. If it's not a partial index, we lock
continue;
/*
- * The index list might include fictitious indexes inserted by a
+ * The index list might include hypothetical indexes inserted by a
* get_relation_info hook --- don't try to access them.
*/
- if (!OidIsValid(index->indexoid))
+ if (index->hypothetical)
continue;
/*
int ncolumns; /* number of columns in index */
Oid *opfamily; /* OIDs of operator families for columns */
int *indexkeys; /* column numbers of index's keys, or 0 */
- Oid *indexcollations;/* OIDs of the collations of the index columns */
+ Oid *indexcollations; /* OIDs of collations of index columns */
Oid *opcintype; /* OIDs of opclass declared input data types */
Oid *sortopfamily; /* OIDs of btree opfamilies, if orderable */
bool *reverse_sort; /* is sort order descending? */
bool predOK; /* true if predicate matches query */
bool unique; /* true if a unique index */
+ bool hypothetical; /* true if index doesn't really exist */
bool amcanorderbyop; /* does AM support order by operator result? */
bool amoptionalkey; /* can query omit key for the first column? */
bool amsearchnulls; /* can AM search for NULL/NOT NULL entries? */