aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/index.c')
-rw-r--r--src/backend/catalog/index.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 65d297a2508..203d3f1ef80 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.94 1999/11/04 08:00:56 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.95 1999/11/16 04:13:55 momjian Exp $
*
*
* INTERFACE ROUTINES
@@ -120,7 +120,7 @@ GetHeapRelationOid(char *heapRelationName, char *indexRelationName, bool istemp)
indoid = RelnameFindRelid(indexRelationName);
if ((!istemp && OidIsValid(indoid)) ||
- (istemp && get_temp_rel_by_name(indexRelationName) != NULL))
+ (istemp && get_temp_rel_by_username(indexRelationName) != NULL))
elog(ERROR, "Cannot create index: '%s' already exists",
indexRelationName);
@@ -948,7 +948,7 @@ index_create(char *heapRelationName,
Oid heapoid;
Oid indexoid;
PredInfo *predInfo;
- bool istemp = (get_temp_rel_by_name(heapRelationName) != NULL);
+ bool istemp = (get_temp_rel_by_username(heapRelationName) != NULL);
char *temp_relname = NULL;
/* ----------------
@@ -1182,9 +1182,6 @@ index_destroy(Oid indexId)
}
heap_close(attributeRelation, RowExclusiveLock);
- /* does something only if it is a temp index */
- remove_temp_relation(indexId);
-
/* ----------------
* fix INDEX relation
* ----------------
@@ -1211,6 +1208,9 @@ index_destroy(Oid indexId)
index_close(userindexRelation);
RelationForgetRelation(indexId);
+
+ /* does something only if it is a temp index */
+ remove_temp_relation(indexId);
}
/* ----------------------------------------------------------------