[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] CREATE table1 FROM table2
From:       "scott.marlowe" <scott.marlowe () ihs ! com>
Date:       2003-06-23 17:01:19
[Download RAW message or body]

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




---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic