summaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index e0f094756c8..de9ddd258bd 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.134.2.2 2006/02/10 19:01:22 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.134.2.3 2007/08/25 19:08:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -365,8 +365,6 @@ DefineIndex(RangeVar *heapRelation,
relationId, accessMethodName, accessMethodId,
isconstraint);
- heap_close(rel, NoLock);
-
/*
* Report index creation if appropriate (delay this till after most of the
* error checks)
@@ -378,6 +376,8 @@ DefineIndex(RangeVar *heapRelation,
primary ? "PRIMARY KEY" : "UNIQUE",
indexRelationName, RelationGetRelationName(rel))));
+ heap_close(rel, NoLock);
+
index_create(relationId, indexRelationName, indexRelationId,
indexInfo, accessMethodId, tablespaceId, classObjectId,
primary, isconstraint,