aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/relation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/nodes/relation.h')
-rw-r--r--src/include/nodes/relation.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 641446ca712..d39c73b8b9a 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -563,6 +563,10 @@ typedef struct RelOptInfo
* indextlist is a TargetEntry list representing the index columns.
* It provides an equivalent base-relation Var for each simple column,
* and links to the matching indexprs element for each expression column.
+ *
+ * While most of these fields are filled when the IndexOptInfo is created
+ * (by plancat.c), indrestrictinfo and predOK are set later, in
+ * check_index_predicates().
*/
typedef struct IndexOptInfo
{
@@ -595,7 +599,12 @@ typedef struct IndexOptInfo
List *indextlist; /* targetlist representing index columns */
- bool predOK; /* true if predicate matches query */
+ List *indrestrictinfo;/* parent relation's baserestrictinfo list,
+ * less any conditions implied by the index's
+ * predicate (unless it's a target rel, see
+ * comments in check_index_predicates()) */
+
+ bool predOK; /* true if index predicate matches query */
bool unique; /* true if a unique index */
bool immediate; /* is uniqueness enforced immediately? */
bool hypothetical; /* true if index doesn't really exist */