summaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 936d7aa611e..c8c50e8c989 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -8107,7 +8107,7 @@ transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid,
if (!HeapTupleIsValid(indexTuple))
elog(ERROR, "cache lookup failed for index %u", indexoid);
indexStruct = (Form_pg_index) GETSTRUCT(indexTuple);
- if (indexStruct->indisprimary && IndexIsValid(indexStruct))
+ if (indexStruct->indisprimary && indexStruct->indisvalid)
{
/*
* Refuse to use a deferrable primary key. This is per SQL spec,
@@ -8228,7 +8228,7 @@ transformFkeyCheckAttrs(Relation pkrel,
*/
if (indexStruct->indnkeyatts == numattrs &&
indexStruct->indisunique &&
- IndexIsValid(indexStruct) &&
+ indexStruct->indisvalid &&
heap_attisnull(indexTuple, Anum_pg_index_indpred, NULL) &&
heap_attisnull(indexTuple, Anum_pg_index_indexprs, NULL))
{
@@ -12461,7 +12461,7 @@ ATExecReplicaIdentity(Relation rel, ReplicaIdentityStmt *stmt, LOCKMODE lockmode
errmsg("cannot use partial index \"%s\" as replica identity",
RelationGetRelationName(indexRel))));
/* And neither are invalid indexes. */
- if (!IndexIsValid(indexRel->rd_index))
+ if (!indexRel->rd_index->indisvalid)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot use invalid index \"%s\" as replica identity",
@@ -14996,7 +14996,7 @@ validatePartitionedIndex(Relation partedIdx, Relation partedTbl)
elog(ERROR, "cache lookup failed for index %u",
inhForm->inhrelid);
indexForm = (Form_pg_index) GETSTRUCT(indTup);
- if (IndexIsValid(indexForm))
+ if (indexForm->indisvalid)
tuples += 1;
ReleaseSysCache(indTup);
}