Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 97c04fa

Browse files
committed
Disable creation of indexes on system tables.
1 parent e6851f0 commit 97c04fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/catalog/index.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.144 2001/03/22 06:16:10 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.145 2001/04/02 14:34:25 momjian Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -864,6 +864,10 @@ index_create(char *heapRelationName,
864864
indexInfo->ii_NumKeyAttrs < 1)
865865
elog(ERROR, "must index at least one attribute");
866866

867+
if (heapRelationName && !allow_system_table_mods &&
868+
IsSystemRelationName(heapRelationName) && IsNormalProcessingMode())
869+
elog(ERROR, "User-defined indexes on system catalogs are not supported");
870+
867871
/*
868872
* get heap relation oid and open the heap relation
869873
*/

0 commit comments

Comments
 (0)