aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-12-27 10:07:46 +0100
committerPeter Eisentraut <peter_e@gmx.net>2018-12-27 10:07:46 +0100
commitae4472c619341ff0517254d395d74796277622e6 (patch)
tree5daca0e94126883dae6814c2ecbadc87c085f0db /src/backend/commands/cluster.c
parent5c828307973366f424438b848d4cca6ef98c032e (diff)
downloadpostgresql-ae4472c619341ff0517254d395d74796277622e6.tar.gz
postgresql-ae4472c619341ff0517254d395d74796277622e6.zip
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
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r--src/backend/commands/cluster.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 610e425a566..6ae0debe152 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -470,7 +470,7 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck, LOCKMOD
* might put recently-dead tuples out-of-order in the new table, and there
* is little harm in that.)
*/
- if (!IndexIsValid(OldIndex->rd_index))
+ if (!OldIndex->rd_index->indisvalid)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot cluster on invalid index \"%s\"",
@@ -545,7 +545,7 @@ mark_index_clustered(Relation rel, Oid indexOid, bool is_internal)
else if (thisIndexOid == indexOid)
{
/* this was checked earlier, but let's be real sure */
- if (!IndexIsValid(indexForm))
+ if (!indexForm->indisvalid)
elog(ERROR, "cannot cluster on invalid index %u", indexOid);
indexForm->indisclustered = true;
CatalogTupleUpdate(pg_index, &indexTuple->t_self, indexTuple);