Skip site navigation (1) Skip section navigation (2)

Re: How do I copy part of table from db1 to db2 (and rename the columns)?

From: Roman Neuhauser <neuhauser(at)sigpipe(dot)cz>
To: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
Cc: Pgsql-sql(at)postgresql(dot)org,Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I copy part of table from db1 to db2 (and rename the columns)?
Date: 2005-08-31 10:40:11
Message-ID: 20050831104011.GB74859@isis.sigpipe.cz (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-sql
# J(dot)Kraaijeveld(at)Askesis(dot)nl / 2005-08-31 12:00:30 +0200:
> I want to copy several columns of a source table from db1 to db2, and
> create the target table and rename the columns in the process. 
> 
> Is that possible in PostgresQL? If so, an example or url for such a
> command /script would be appreciated...

    check these man pages: pg_dump(1), pg_restore(1), alter_table(7)

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

In response to

Responses

pgsql-sql by date

Next:From: Joost KraaijeveldDate: 2005-08-31 12:00:03
Subject: Re: How do I copy part of table from db1 to db2 (and
Previous:From: Kenneth GonsalvesDate: 2005-08-31 10:15:49
Subject: Re: How do I copy part of table from db1 to db2 (and rename the columns)?

pgsql-general by date

Next:From: Ben-Nes YonatanDate: 2005-08-31 11:04:27
Subject: Re: detection of VACUUM in progress
Previous:From: David SankelDate: 2005-08-31 10:30:14
Subject: Removing all users from a group

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group