diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-16 19:24:50 -0500 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-16 19:24:50 -0500 |
| commit | 7422e0081d04ee4373a822392c729eb892a9d25e (patch) | |
| tree | f08f023bfd09fe44060d2d79b04014dcd6151455 /src/include/nodes/relation.h | |
| parent | 8e4b1473126cc72fa9bcc5b079055c71bc267656 (diff) | |
Fix bogus test for hypothetical indexes in get_actual_variable_range().
That function was supposing that indexoid == 0 for a hypothetical index,
but that is not likely to be true in any non-toy implementation of an index
adviser, since assigning a fake OID is the only way to know at EXPLAIN time
which hypothetical index got selected. Fix by adding a flag to
IndexOptInfo to mark hypothetical indexes. Back-patch to 9.0 where
get_actual_variable_range() was added.
Gurjeet Singh
Diffstat (limited to 'src/include/nodes/relation.h')
| -rw-r--r-- | src/include/nodes/relation.h | 2 |
1 files changed, 2 insertions, 0 deletions
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; |
