From: Raymond O'Donnell <rod@iol.ie>
To: Bob Pawley <rjpawley@shaw.ca>
Cc: Adrian Klaver <aklaver@comcast.net>
Cc: pgsql-general@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: pg_restore
Date: Sun, 28 Oct 2007 23:12:55 +0000
Message-ID: <47251777.2000700@iol.ie> (raw)
In-Reply-To: <001901c819b3$822878f0$6401a8c0@owner>
References: <004401c81990$ef57e8c0$6401a8c0@owner>
<7589.1193606901@sss.pgh.pa.us>
<000c01c819ae$2a89ffb0$6401a8c0@owner>
<200710281515.39475.aklaver@comcast.net>
<001901c819b3$822878f0$6401a8c0@owner>
On 28/10/2007 22:40, Bob Pawley wrote:
> pg_dump -h localhost -d Aurel -U postgres
>
> Could you suggest a dump command that will match the restore command -
>
> pg_restore -h localhost -d PDW -U postgres aurel.sql
One thing that caught me, and I suspect may be catching you also -
somewhat confusingly, in pg_restore the -d option specifies the database
to which to restore; in pg_dump it instead causes the data to be dumped
as INSERT statements rather than COPY.
I can see why things may work this way (pg_dump always needs to be
pointed at a database, whereas pg_restore doesn't if the dump is going
to create the database)....but it can trap the unwary.
See the docs at
http://www.postgresql.org/docs/8.2/static/reference-client.html
Ray.
---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rod@iol.ie, rjpawley@shaw.ca, aklaver@comcast.net, tgl@sss.pgh.pa.us
Subject: Re: pg_restore
In-Reply-To: <47251777.2000700@iol.ie>
References: <004401c81990$ef57e8c0$6401a8c0@owner> <7589.1193606901@sss.pgh.pa.us> <000c01c819ae$2a89ffb0$6401a8c0@owner> <200710281515.39475.aklaver@comcast.net> <001901c819b3$822878f0$6401a8c0@owner> <47251777.2000700@iol.ie>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox