From ae4472c619341ff0517254d395d74796277622e6 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 27 Dec 2018 10:07:46 +0100 Subject: Remove obsolete IndexIs* macros Remove IndexIsValid(), IndexIsReady(), IndexIsLive() in favor of accessing the index structure directly. These macros haven't been used consistently, and the original reason of maintaining source compatibility with PostgreSQL 9.2 is gone. Discussion: https://www.postgresql.org/message-id/flat/d419147c-09d4-6196-5d9d-0234b230880a%402ndquadrant.com --- src/backend/utils/cache/relcache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/cache/relcache.c') diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index c3071db1cdf..c88871fd3ce 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -4221,7 +4221,7 @@ RelationGetFKeyList(Relation relation) * so that we must recompute the index list on next request. This handles * creation or deletion of an index. * - * Indexes that are marked not IndexIsLive are omitted from the returned list. + * Indexes that are marked not indislive are omitted from the returned list. * Such indexes are expected to be dropped momentarily, and should not be * touched at all by any caller of this function. * @@ -4288,7 +4288,7 @@ RelationGetIndexList(Relation relation) * HOT-safety decisions. It's unsafe to touch such an index at all * since its catalog entries could disappear at any instant. */ - if (!IndexIsLive(index)) + if (!index->indislive) continue; /* Add index's OID to result list in the proper order */ @@ -4299,7 +4299,7 @@ RelationGetIndexList(Relation relation) * interesting for either oid indexes or replication identity indexes, * so don't check them. */ - if (!IndexIsValid(index) || !index->indisunique || + if (!index->indisvalid || !index->indisunique || !index->indimmediate || !heap_attisnull(htup, Anum_pg_index_indpred, NULL)) continue; -- cgit v1.2.3