]> granicus.if.org Git - postgresql/commitdiff
Preserve constraints and column defaults during CLUSTER.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Jan 2001 01:22:21 +0000 (01:22 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Jan 2001 01:22:21 +0000 (01:22 +0000)
Wish they were all this easy ...

src/backend/commands/cluster.c

index c81cb041e944bcd8621014d35e7e4d12bc0e831f..4aeae71561ecf5bb33a7ccdc9f8cb93abf740f73 100644 (file)
@@ -15,7 +15,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.62 2001/01/10 01:12:28 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.63 2001/01/12 01:22:21 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -157,7 +157,7 @@ copy_heap(Oid OIDOldHeap, char *NewName, bool istemp)
         * Need to make a copy of the tuple descriptor,
         * since heap_create_with_catalog modifies it.
         */
-       tupdesc = CreateTupleDescCopy(OldHeapDesc);
+       tupdesc = CreateTupleDescCopyConstr(OldHeapDesc);
 
        OIDNewHeap = heap_create_with_catalog(NewName, tupdesc,
                                                                                  RELKIND_RELATION, istemp,