On Wed, Feb 16, 2011 at 10:26 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Gurjeet Singh <singh.gurj...@gmail.com> writes: > > BTW, you use the term 'fictitious' in the comments, would it be > better > > to standardize the term used for such an index? So either the comment > would > > be changed to call it hypothetical, or the structure member would be > changed > > to isfictitious. > > Yeah, hypothetical is the more-established term I think. > Please find the patch attached. Regards, -- gurjeet.singh @ EnterpriseDB - The Enterprise Postgres Company http://www.EnterpriseDB.com singh.gurjeet@{ gmail | yahoo }.com Twitter/Skype: singh_gurjeet Mail sent from my BlackLaptop device
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index b3299b5..241f31c 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -4562,10 +4562,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->ishypothetical) continue; /* diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 49ce441..ec51b34 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -469,6 +469,7 @@ typedef struct IndexOptInfo bool predOK; /* true if predicate matches query */ bool unique; /* true if a unique index */ + bool ishypothetical; /* true if this index does not exist in pg_index */ 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? */
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers