Search Postgresql Archives

Re: pg_restore issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Leonardo =?iso-8859-1?Q?M=2E_Ram=E9?= <l.rame@xxxxxxxxxxx> writes:
> On 2014-02-12 13:30:52 -0500, Tom Lane wrote:
>> The -c switch causes pg_restore to try to DROP every object it's about to
>> restore.  If you're restoring into an empty database then this is useless,
>> and in fact will not work if you're also using --exit-on-error.  Remove
>> one or the other switch.

> Tom, I've dropped the db, then createdb again, then removed the -c
> option, now I get this error:

> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 735; 2612 213488
> PROCEDURAL LANGUAGE plpgsql postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  language
> "plpgsql" already exists
>     Command was: CREATE PROCEDURAL LANGUAGE plpgsql;

pg_dump versions more recent than 8.4 use "CREATE OR REPLACE PROCEDURAL
LANGUAGE" to work around the possibility that plpgsql is preinstalled.
If you don't want to use a modern pg_dump, you'll need to not use
--exit-on-error.

In general, it's recommended to use the newer pg_dump when trying to
transfer data from an older installation to a newer one.  You can
generally make it work without that, but it's not necessarily going
to be seamless, and one of the ways it tends to not be seamless is
that you have to be willing to ignore harmless errors.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux