X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 46225D1B51F for ; Sun, 7 Mar 2004 02:26:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 74665-01 for ; Sat, 6 Mar 2004 22:26:35 -0400 (AST) Received: from gw.tssi.com (gw.tssi.com [198.147.197.1]) by svr1.postgresql.org (Postfix) with ESMTP id D8B3ED1B4ED for ; Sat, 6 Mar 2004 22:26:30 -0400 (AST) Received: from gw.tssi.com (nolan@gw.tssi.com [127.0.0.1] (may be forged)) by gw.tssi.com (8.12.6/8.12.6) with ESMTP id i272QV8S006571; Sat, 6 Mar 2004 20:26:32 -0600 Received: (from nolan@localhost) by gw.tssi.com (8.12.6/8.12.6/Submit) id i272QUE8006569; Sat, 6 Mar 2004 20:26:30 -0600 From: Mike Nolan Message-Id: <200403070226.i272QUE8006569@gw.tssi.com> Subject: Re: Fixed width rows faster? To: neilc@samurai.com (Neil Conway) Date: Sat, 6 Mar 2004 20:26:30 -0600 (CST) Cc: pg@rbt.ca (Rod Taylor), josh@agliodbs.com (Josh Berkus), wmoran@potentialtech.com (Bill Moran), threshar@torgo.978.org (Jeff), pgsql-performance@postgresql.org (Postgresql Performance) In-Reply-To: <404A7B98.7090401@samurai.com> from "Neil Conway" at Mar 06, 2004 08:32:08 PM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/81 X-Sequence-Number: 5937 > Mike Nolan wrote: > > Is there a way to copy a table INCLUDING the check constraints? If not, > > then that information is lost, unlike varchar(n). > > "pg_dump -t" should work fine, unless I'm misunderstanding you. I was specifically referring to doing it in SQL. The COPY command goes from table to file or file to table, the CREATE TABLE ... SELECT loses the check constraints. Is there no SQL command that allows me to clone a table, including check constraints? Something like COPY TABLE xxx TO TABLE yyy WITH CHECK CONSTRAINTS. -- Mike Nolan