diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend/nodes/outfuncs.c | 2 | ||||
| -rw-r--r-- | src/backend/optimizer/util/plancat.c | 1 | ||||
| -rw-r--r-- | src/backend/utils/adt/selfuncs.c | 4 | ||||
| -rw-r--r-- | src/include/nodes/relation.h | 2 | 
4 files changed, 7 insertions, 2 deletions
| diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 15a9aa2f939..09dc9ccb5ec 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -1611,10 +1611,12 @@ _outIndexOptInfo(StringInfo str, IndexOptInfo *node)  	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 diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 10800b488f6..d5d452475bf 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -275,6 +275,7 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent,  				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 diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index c08310ba415..5c7e8325a19 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -4555,10 +4555,10 @@ get_actual_variable_range(PlannerInfo *root, VariableStatData *vardata,  			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;  		/* diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index f109a1de520..7d39e10747a 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -471,6 +471,8 @@ typedef struct IndexOptInfo  	bool		amsearchnulls;	/* can AM search for NULL/NOT NULL entries? */  	bool		amhasgettuple;	/* does AM have amgettuple interface? */  	bool		amhasgetbitmap; /* does AM have amgetbitmap interface? */ +	/* added in 9.0.4: */ +	bool		hypothetical;	/* true if index doesn't really exist */  } IndexOptInfo; | 
