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

Re: Export

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jana Vasseru" <jana(dot)vasseru(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Export
Date: 2009-04-06 00:17:08
Message-ID: 5130.1238977028@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Jana Vasseru" <jana(dot)vasseru(at)gmail(dot)com> writes:
> a) how can i export database schema structure and data so that they can be  
> imported to another server - into different
> database, different tablespace and with a different owner ?

pg_dump's --no-owner switch might help for the last.  If you want to
change tablespace names you'll probably have to edit the dump script
manually.  It might be easier to use ALTER TABLESPACE RENAME to
temporarily make the destination's tablespace configuration match
by name before you load the dump.

> b) how can i export structure of database so that SERIAL columns remain  
> SERIAL?

pg_dump does not bother with the SERIAL shorthand.  It's only shorthand,
there is no functional difference.

			regards, tom lane

In response to

  • Export at 2009-04-05 23:46:17 from Jana Vasseru

pgsql-novice by date

Next:From: P KapatDate: 2009-04-07 01:37:33
Subject: drop a table from non-public schema
Previous:From: Jana VasseruDate: 2009-04-05 23:46:17
Subject: Export

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