Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 63F4A9F9FB6 for ; Sun, 28 Oct 2007 20:13:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 23606-04 for ; Sun, 28 Oct 2007 20:12:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail26.svc.cra.dublin.eircom.net (mail26.svc.cra.dublin.eircom.net [159.134.118.55]) by postgresql.org (Postfix) with SMTP id 91A4F9F9FAE for ; Sun, 28 Oct 2007 20:12:55 -0300 (ADT) Received: (qmail 68251 messnum 4956546 invoked from network[86.42.35.78/86-42-35-78.b-ras1.mvw.galway.eircom.net]); 28 Oct 2007 23:12:53 -0000 Received: from 86-42-35-78.b-ras1.mvw.galway.eircom.net (HELO ?127.0.0.1?) (86.42.35.78) by mail26.svc.cra.dublin.eircom.net (qp 68251) with SMTP; 28 Oct 2007 23:12:53 -0000 Message-ID: <47251777.2000700@iol.ie> Date: Sun, 28 Oct 2007 23:12:55 +0000 From: Raymond O'Donnell Reply-To: rod@iol.ie User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Bob Pawley CC: Adrian Klaver , pgsql-general@postgresql.org, Tom Lane Subject: Re: pg_restore References: <004401c81990$ef57e8c0$6401a8c0@owner> <7589.1193606901@sss.pgh.pa.us> <000c01c819ae$2a89ffb0$6401a8c0@owner> <200710281515.39475.aklaver@comcast.net> <001901c819b3$822878f0$6401a8c0@owner> In-Reply-To: <001901c819b3$822878f0$6401a8c0@owner> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 071028-0, 28/10/2007), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/1508 X-Sequence-Number: 122800 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 ---------------------------------------------------------------