Re: CREATE table1 FROM table2

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: "L(dot)V(dot)Boldareva" <me(at)pierro(dot)dds(dot)nl>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: CREATE table1 FROM table2
Date: 2003-06-23 17:01:19
Message-ID: Pine.LNX.4.33.0306231100100.23895-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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...

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael A Nachbaur 2003-06-23 17:32:56 Re: multi-table unique index
Previous Message Randall Lucas 2003-06-23 16:53:39 Re: TR: Like and =