diff options
author | Bruce Momjian | 2001-04-02 14:34:25 +0000 |
---|---|---|
committer | Bruce Momjian | 2001-04-02 14:34:25 +0000 |
commit | 97c04fad822cdbc8707a69c33ecfb30a5439e975 (patch) | |
tree | ea84d4bd80acd4b8db2d04375d3f552f7eefcde6 /src/backend | |
parent | e6851f056a8f8f87dd17f3559f77a53f9526cf72 (diff) |
Disable creation of indexes on system tables.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/catalog/index.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 3b150e5340b..2adb30e1ed8 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.144 2001/03/22 06:16:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.145 2001/04/02 14:34:25 momjian Exp $ * * * INTERFACE ROUTINES @@ -864,6 +864,10 @@ index_create(char *heapRelationName, indexInfo->ii_NumKeyAttrs < 1) elog(ERROR, "must index at least one attribute"); + if (heapRelationName && !allow_system_table_mods && + IsSystemRelationName(heapRelationName) && IsNormalProcessingMode()) + elog(ERROR, "User-defined indexes on system catalogs are not supported"); + /* * get heap relation oid and open the heap relation */ |