*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.25 2000/04/25 02:45:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.26 2000/04/25 10:38:38 inoue Exp $
*
*-------------------------------------------------------------------------
*/
((Form_pg_class) GETSTRUCT(tuple))->relkind);
}
- reindex_index(tuple->t_data->t_oid, force);
+ if (!reindex_index(tuple->t_data->t_oid, force))
+ elog(NOTICE, "index '%s' wasn't reindexed", name);
}
/*
((Form_pg_class) GETSTRUCT(tuple))->relkind);
}
- reindex_relation(tuple->t_data->t_oid, force);
+ if (!reindex_relation(tuple->t_data->t_oid, force))
+ elog(NOTICE, "table '%s' wasn't reindexed", name);
}
/*
elog(ERROR, "REINDEX DATABASE: Can be executed only on the currently open database.");
heap_close(relation, NoLock);
- /** reindex_database(db_id, force, !all); **/
CommonSpecialPortalOpen();
pmem = CommonSpecialPortalGetMemory();
for (i = 0; i < relcnt; i++)
{
StartTransactionCommand();
- reindex_relation(relids[i], force);
+ if (reindex_relation(relids[i], force))
+ elog(NOTICE, "relation %d was reindexed", relids[i]);
CommitTransactionCommand();
}
CommonSpecialPortalClose();
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.86 2000/04/12 17:15:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.87 2000/04/25 10:38:38 inoue Exp $
*
*-------------------------------------------------------------------------
*/
if (IsSystemRelationName(relname))
{
if (!allowSystemTableMods && IsSystemRelationName(relname))
- elog(ERROR, "class \"%s\" is a system catalog index",
- relname);
+ elog(ERROR, "\"%s\" is a system index. call REINDEX under standalone postgres with -O -P options",
+ relname);
if (!IsIgnoringSystemIndexes())
- elog(ERROR, "class \"%s\" is a system catalog index",
- relname);
+ elog(ERROR, "\"%s\" is a system index. call REINDEX under standalone postgres with -P -O options",
+ relname);
}
#ifndef NO_SECURITY
if (!pg_ownercheck(userName, relname, RELNAME))
if (IsSystemRelationName(relname))
{
if (!allowSystemTableMods && IsSystemRelationName(relname))
- elog(ERROR, "class \"%s\" is a system catalog index",
- relname);
+ elog(ERROR, "\"%s\" is a system table. call REINDEX under standalone postgres with -O -P options",
+ relname);
if (!IsIgnoringSystemIndexes())
- elog(ERROR, "class \"%s\" is a system catalog index",
- relname);
+ elog(ERROR, "\"%s\" is a system table. call REINDEX under standalone postgres with -P -O options",
+
+ relname);
}
#ifndef NO_SECURITY
if (!pg_ownercheck(userName, relname, RELNAME))
case DATABASE:
relname = (char *) stmt->name;
if (!allowSystemTableMods)
- elog(ERROR, "-O option is needed");
+ elog(ERROR, "must be called under standalone postgres with -O -P options");
if (!IsIgnoringSystemIndexes())
- elog(ERROR, "-P option is needed");
+ elog(ERROR, "must be called under standalone postgres with -P -O options");
ReindexDatabase(relname, stmt->force, false);
break;
}