X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 346E730F6B6 for ; Mon, 23 Jun 2003 17:04:14 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 15740-06 for ; Mon, 23 Jun 2003 14:04:03 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 66F9430F674 for ; Mon, 23 Jun 2003 14:04:03 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.9/8.12.9) with ESMTP id h5NH3MhB020547; Mon, 23 Jun 2003 11:03:22 -0600 (MDT) Date: Mon, 23 Jun 2003 11:01:19 -0600 (MDT) From: "scott.marlowe" To: "L.V.Boldareva" Cc: Subject: Re: CREATE table1 FROM table2 In-Reply-To: <98966401561.20030623172606@pierro.dds.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-Archive-Number: 200306/266 X-Sequence-Number: 14024 On Mon, 23 Jun 2003, L.V.Boldareva wrote: > Hello! > > many people posted their answer to this simple question. however, > neither > CREATE TABLE AS > nor > SELECT INTO > > do not take care about keys and triggers, etc. > > The commands above only copy the structure of the table, and the data. > Are there any workarounds fr copying the table as a whole object? You probably want to use pg_dump dbname -t tablename and edit the file thus created by hand to create a new table etc...