Re: Export and import from one postgres server to another - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Export and import from one postgres server to another
Date
Msg-id 4FC57F74.6030405@gmail.com
Whole thread Raw
In response to Re: Export and import from one postgres server to another  (Craig Ringer <ringerc@ringerc.id.au>)
Responses Re: Export and import from one postgres server to another
List pgsql-general
On 05/29/2012 06:56 PM, Craig Ringer wrote:
> On 05/29/2012 02:27 AM, Alexander Reichstadt wrote:
>> Hi,
>>
>> I am trying to "simply" export my postgres database from one server and then import it into another. I thought I
coulduse PhpPgAdmin, but the hints on the web don't seem to work. One said to simply get a dump from one phpPgAdmin,
thego to the other server, select the database, click the SQL button and then select the dump file. When I do this the
importfails because the dump file begins with a \connect statement. 
>
> I don't really know why pg_dump includes that \connect , but it isn't
> the only problem you'll hit with that approach. PgAdmin-III seems to
> wrap the invoked SQL in a transaction, and the dump will try to
> (re)-create the `postgres' role, which will fail and abort the transaction.

Well just to keep the confusion level down a bit, the OP was referring
to phpPgAdmin:)


>
> --
> Craig Ringer


--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Export and import from one postgres server to another
Next
From: Adrian Klaver
Date:
Subject: Re: timestamps, formatting, and internals