summaryrefslogtreecommitdiff
path: root/src/backend/commands/matview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/matview.c')
-rw-r--r--src/backend/commands/matview.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c
index fb30d2595cf..c00b9df3e3b 100644
--- a/src/backend/commands/matview.c
+++ b/src/backend/commands/matview.c
@@ -692,15 +692,12 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,
int indnkeyatts = indexStruct->indnkeyatts;
oidvector *indclass;
Datum indclassDatum;
- bool isnull;
int i;
/* Must get indclass the hard way. */
- indclassDatum = SysCacheGetAttr(INDEXRELID,
- indexRel->rd_indextuple,
- Anum_pg_index_indclass,
- &isnull);
- Assert(!isnull);
+ indclassDatum = SysCacheGetAttrNotNull(INDEXRELID,
+ indexRel->rd_indextuple,
+ Anum_pg_index_indclass);
indclass = (oidvector *) DatumGetPointer(indclassDatum);
/* Add quals for all columns from this index. */