mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
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
This commit is contained in:
6
src/backend/utils/cache/relcache.c
vendored
6
src/backend/utils/cache/relcache.c
vendored
@ -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;
|
||||
|
Reference in New Issue
Block a user