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

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 (view raw, whole thread or download thread mbox)
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.



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

In response to

pgsql-admin by date

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

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