From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
---|---|
To: | Bob Pawley <rjpawley(at)shaw(dot)ca> |
Cc: | Adrian Klaver <aklaver(at)comcast(dot)net>, pgsql-general(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: pg_restore |
Date: | 2007-10-28 23:12:55 |
Message-ID: | 47251777.2000700@iol.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)iol(dot)ie
---------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2007-10-28 23:19:17 | Re: pg_restore |
Previous Message | Adrian Klaver | 2007-10-28 22:58:55 | Re: pg_restore |