1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-25 21:42:33 +03:00

Disable creation of indexes on system tables.

This commit is contained in:
Bruce Momjian 2001-04-02 14:34:25 +00:00
parent e6851f056a
commit 97c04fad82

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
@ -864,6 +864,10 @@ index_create(char *heapRelationName,
indexInfo->ii_NumKeyAttrs < 1) indexInfo->ii_NumKeyAttrs < 1)
elog(ERROR, "must index at least one attribute"); 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 * get heap relation oid and open the heap relation
*/ */