aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-10-22 23:32:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-10-22 23:32:48 +0000
commit9ace03183c56ca3474679bc56316e962d0af4b81 (patch)
treefd385e10d8d458985f9410ccc4170ae6fa5acb26 /src/backend/commands/indexcmds.c
parentee28d8b3d509593c980b8cdcc5a8943a429bdc9b (diff)
downloadpostgresql-9ace03183c56ca3474679bc56316e962d0af4b81.tar.gz
postgresql-9ace03183c56ca3474679bc56316e962d0af4b81.zip
Some small polishing of Mark Hollomon's cleanup of DROP command: might
as well allow DROP multiple INDEX, RULE, TYPE as well. Add missing CommandCounterIncrement to DROP loop, which could cause trouble otherwise with multiple DROP of items affecting same catalog entries. Try to bring a little consistency to various error messages using 'does not exist', 'nonexistent', etc --- I standardized on 'does not exist' since that's what the vast majority of the existing uses seem to be.
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 64cdf840f06..f9d1a92c758 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.38 2000/09/06 14:15:16 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.39 2000/10/22 23:32:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -610,7 +610,7 @@ RemoveIndex(char *name)
0, 0, 0);
if (!HeapTupleIsValid(tuple))
- elog(ERROR, "index \"%s\" nonexistent", name);
+ elog(ERROR, "index \"%s\" does not exist", name);
if (((Form_pg_class) GETSTRUCT(tuple))->relkind != RELKIND_INDEX)
{
@@ -640,7 +640,7 @@ ReindexIndex(const char *name, bool force /* currently unused */ )
0, 0, 0);
if (!HeapTupleIsValid(tuple))
- elog(ERROR, "index \"%s\" nonexistent", name);
+ elog(ERROR, "index \"%s\" does not exist", name);
if (((Form_pg_class) GETSTRUCT(tuple))->relkind != RELKIND_INDEX)
{
@@ -650,7 +650,7 @@ ReindexIndex(const char *name, bool force /* currently unused */ )
}
if (!reindex_index(tuple->t_data->t_oid, force))
- elog(NOTICE, "index '%s' wasn't reindexed", name);
+ elog(NOTICE, "index \"%s\" wasn't reindexed", name);
}
/*
@@ -671,7 +671,7 @@ ReindexTable(const char *name, bool force)
0, 0, 0);
if (!HeapTupleIsValid(tuple))
- elog(ERROR, "table \"%s\" nonexistent", name);
+ elog(ERROR, "table \"%s\" does not exist", name);
if (((Form_pg_class) GETSTRUCT(tuple))->relkind != RELKIND_RELATION)
{
@@ -681,7 +681,7 @@ ReindexTable(const char *name, bool force)
}
if (!reindex_relation(tuple->t_data->t_oid, force))
- elog(NOTICE, "table '%s' wasn't reindexed", name);
+ elog(NOTICE, "table \"%s\" wasn't reindexed", name);
}
/*
@@ -719,7 +719,7 @@ ReindexDatabase(const char *dbname, bool force, bool all)
scan = heap_beginscan(relation, 0, SnapshotNow, 1, &scankey);
dbtuple = heap_getnext(scan, 0);
if (!HeapTupleIsValid(dbtuple))
- elog(ERROR, "Database \"%s\" doesn't exist", dbname);
+ elog(ERROR, "Database \"%s\" does not exist", dbname);
db_id = dbtuple->t_data->t_oid;
db_owner = ((Form_pg_database) GETSTRUCT(dbtuple))->datdba;
heap_endscan(scan);
@@ -789,7 +789,7 @@ ReindexDatabase(const char *dbname, bool force, bool all)
{
StartTransactionCommand();
if (reindex_relation(relids[i], force))
- elog(NOTICE, "relation %d was reindexed", relids[i]);
+ elog(NOTICE, "relation %u was reindexed", relids[i]);
CommitTransactionCommand();
}
StartTransactionCommand();