aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r--src/backend/commands/cluster.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 0c83e237fe8..196d6baaa41 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.173 2008/04/13 19:18:14 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.174 2008/05/09 23:32:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -639,9 +639,12 @@ make_new_heap(Oid OIDOldHeap, const char *NewName, Oid NewTableSpace)
/*
* Need to make a copy of the tuple descriptor, since
- * heap_create_with_catalog modifies it.
+ * heap_create_with_catalog modifies it. Note that the NewHeap will
+ * not receive any of the defaults or constraints associated with the
+ * OldHeap; we don't need 'em, and there's no reason to spend cycles
+ * inserting them into the catalogs only to delete them.
*/
- tupdesc = CreateTupleDescCopyConstr(OldHeapDesc);
+ tupdesc = CreateTupleDescCopy(OldHeapDesc);
/*
* Use options of the old heap for new heap.
@@ -662,6 +665,7 @@ make_new_heap(Oid OIDOldHeap, const char *NewName, Oid NewTableSpace)
InvalidOid,
OldHeap->rd_rel->relowner,
tupdesc,
+ NIL,
OldHeap->rd_rel->relkind,
OldHeap->rd_rel->relisshared,
true,