diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-11-20 02:46:13 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-11-20 02:46:13 +0000 |
commit | 604f54cd2728d01cd4716664644fd466d64e9e5d (patch) | |
tree | 46ebe34e27b1714f71c9eb8fd6f6ee238707c7f3 /src/backend/tcop/utility.c | |
parent | fb726283b60572dd3390e3f96b85ab21ab3ccc6e (diff) | |
download | postgresql-REL7_2_BETA3.tar.gz postgresql-REL7_2_BETA3.zip |
Some minor tweaks of REINDEX processing: grab exclusive lock a littleREL7_2_BETA3
earlier, make error checks more uniform.
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 7142f0e60f6..4755025a9d0 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.122 2001/10/25 05:49:43 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.123 2001/11/20 02:46:13 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -865,7 +865,7 @@ ProcessUtility(Node *parsetree, relname = (char *) stmt->name; if (IsSystemRelationName(relname)) { - if (!allowSystemTableMods && IsSystemRelationName(relname)) + if (!allowSystemTableMods) elog(ERROR, "\"%s\" is a system index. call REINDEX under standalone postgres with -O -P options", relname); if (!IsIgnoringSystemIndexes()) @@ -878,6 +878,15 @@ ProcessUtility(Node *parsetree, break; case TABLE: relname = (char *) stmt->name; + if (IsSystemRelationName(relname)) + { + if (!allowSystemTableMods) + elog(ERROR, "\"%s\" is a system table. call REINDEX under standalone postgres with -O -P options", + relname); + if (!IsIgnoringSystemIndexes()) + elog(ERROR, "\"%s\" is a system table. call REINDEX under standalone postgres with -P -O options", + relname); + } if (!pg_ownercheck(GetUserId(), relname, RELNAME)) elog(ERROR, "%s: %s", relname, aclcheck_error_strings[ACLCHECK_NOT_OWNER]); ReindexTable(relname, stmt->force); |