X-Original-To: pgsql-sql@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 15963925D36 for ; Thu, 29 May 2003 12:36:01 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 06739-01 for ; Thu, 29 May 2003 12:35:59 -0400 (EDT) Received: from netsys-nt-serv.netsys.co.za (netsys-nt-serv.netsys.co.za [192.96.51.2]) by developer.postgresql.org (Postfix) with ESMTP id 7EBDE925D04 for ; Thu, 29 May 2003 12:35:56 -0400 (EDT) Received: from there (tiaan.netsys.co.za [192.96.51.30]) by netsys-nt-serv.netsys.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id HXZVWKT3; Thu, 29 May 2003 18:34:44 +0200 Content-Type: text/plain; charset="iso-8859-1" X-Sybari-Space: 00000000 00000000 00000000 00000000 From: Tiaan Wessels To: pgsql-sql@postgresql.org Subject: CREATE TABLES AS looses constraints Date: Thu, 29 May 2003 16:35:34 +0000 X-Mailer: KMail [version 1.3.1] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20030529163556.7EBDE925D04@developer.postgresql.org> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/551 X-Sequence-Number: 13716 Hi, It seems as if a CREATE TABLES AS does not duplicate the table constraints. How can I enforce this. I need the fastest possible way to make an exact copy of a table. This is to support the administrative mechanism in an app where changes are made to a mirrored copy of a set of tables first and when happy, these are copied to the operational tables. Regards Tiaan