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 Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/a2095f7fb5a57ea1794f25d029756d9a140fd429 Modified Files -------------- src/backend/nodes/outfuncs.c | 2 ++ src/backend/optimizer/util/plancat.c | 1 + src/backend/utils/adt/selfuncs.c | 4 ++-- src/include/nodes/relation.h | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers