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

Re: copying tables

From: ERIC Lawson - x52010 <eric(at)bioeng(dot)washington(dot)edu>
To: Robert Kernell <kernell(at)sundog(dot)larc(dot)nasa(dot)gov>
Cc: pg-novice list <pgsql-novice(at)postgresql(dot)org>
Subject: Re: copying tables
Date: 2001-02-21 17:05:23
Message-ID: Pine.LNX.4.21.0102210858580.355-100000@arwen.bioeng.washington.edu (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novice
Check out pg_dump:  basically, this works --

pg_dump -t tablename olddbname > table.out

followed by

psql -d newdbname < table.out

or

psql -d newdbname -f table.out

On Tue, 20 Feb 2001, Robert Kernell wrote:

> Hi. I am trying to copy tables. I want to copy a table in one database to a 
> table in another database. The tables are identical. Here is to code and the 
> error when using DBI. Can I just use postgresQL somehow?
> 
> Thank you.
> 
> Bob Kernell
> Research Scientist
> Analytical Services & Materials, Inc.
> NASA Atmospheric Sciences Competency
> Radiation and Aerolsols Branch
> email: r(dot)w(dot)kernell(at)larc(dot)nasa(dot)gov
> tel: 757-827-4631
> 

-- 

James Eric Lawson
Research Publications Editor III
National Simulation Resource

eric(at)bioeng(dot)washington(dot)edu

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Everyday language is a part of the human organism and is no less 
complicated than it. - Ludwig Wittgenstein (1889-1951) [Tractatus 
Logico-Philosophicus, 1921]



In response to

pgsql-novice by date

Next:From: Mike FriesenDate: 2001-02-21 19:15:26
Subject: General Inquiry
Previous:From: ERIC Lawson - x52010Date: 2001-02-21 16:50:22
Subject: Re: changing column data types

pgsql-general by date

Next:From: Brent R. MatzelleDate: 2001-02-21 17:06:35
Subject: Re: Re: Printing PostgreSQL reports
Previous:From: David WheelerDate: 2001-02-21 16:48:16
Subject: Re: Grant on Database?

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