From e0008c8e1504af1e8c5de25c2991423adb8ea30f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 21 Jun 2019 10:24:03 +0200 Subject: [PATCH v1 3/3] Disable dead code --- src/backend/catalog/index.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 587b717242..71ed9ea639 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -755,12 +755,14 @@ index_create(Relation heapRelation, if (indexInfo->ii_NumIndexAttrs < 1) elog(ERROR, "must index at least one column"); +#ifdef NOT_USED if (!allow_system_table_mods && IsSystemRelation(heapRelation) && IsNormalProcessingMode()) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("user-defined indexes on system catalog tables are not supported"))); +#endif /* * Concurrent index build on a system catalog is unsafe because we tend to @@ -1700,6 +1702,7 @@ index_constraint_create(Relation heapRelation, /* constraint creation support doesn't work while bootstrapping */ Assert(!IsBootstrapProcessingMode()); +#ifdef NOT_USED /* enforce system-table restriction */ if (!allow_system_table_mods && IsSystemRelation(heapRelation) && @@ -1707,6 +1710,7 @@ index_constraint_create(Relation heapRelation, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("user-defined indexes on system catalog tables are not supported"))); +#endif /* primary/unique constraints shouldn't have any expressions */ if (indexInfo->ii_Expressions && -- 2.22.0