Re: pg_restore
От | Raymond O'Donnell |
---|---|
Тема | Re: pg_restore |
Дата | |
Msg-id | 47251777.2000700@iol.ie обсуждение исходный текст |
Ответ на | Re: pg_restore (Bob Pawley <rjpawley@shaw.ca>) |
Список | 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@iol.ie ---------------------------------------------------------------
В списке pgsql-general по дате отправления: