Re: change existing table definition

From: "Martin Fandel" <martin(dot)fandel(at)alphyra-evs(dot)de>
To: chen(at)musc(dot)edu
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: change existing table definition
Date: 2005-06-28 20:04:39
Message-ID: 1119989080.8406.10.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> pg_dump -c -t <table name> <database> > <dumpfile>
> psql <database> < <dumpfile>

I don't tested this but i think this works.

Be dangerous with the "-c" Option of dump ;). After
the dump was created, new data could be inserted into the
database. If you dump in the file, all dumped tables are
dropped. It's better to RENAME the existing table and then
COPY in the data.

greetings,

Martin

Am Dienstag, den 28.06.2005, 13:26 -0400 schrieb Chuming Chen:
> pgsql-admin(at)postgresql(dot)org

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ian FREISLICH 2005-06-29 08:43:47 Re: How to compare the schemas ?
Previous Message Chuming Chen 2005-06-28 17:26:56 Re: change existing table definition