Re: Problems with pg_restore (plpgsql already exists)

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Brian Weaver <cmdrclueless(at)gmail(dot)com>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Problems with pg_restore (plpgsql already exists)
Date: 2012-02-25 16:23:50
Message-ID: 274BAD81-38BF-4537-B474-ADCDF77E318A@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Feb 25, 2012, at 9:18 AM, Brian Weaver wrote:

> Thanks for the pointer. Is it just me that finds it the behavior of pg_restore odd? If the default installation since 9.0 has PL/PgSQL installed then why does pg_restore still emit statements to create the language? As a developer by trade it smells like a bug.

It's pg_dump that's emitting the command to create the language. If you ran pg_dump from 9.0+, it would not do so. This is an example of why the standard advice for upgrading is to use the newer pg_dump against the older database--you can often get away without doing that, and I am one of those people who often ignores that advice and does things the easier way until it breaks, but it is safer.

--
Scott Ribe
scott_ribe(at)elevated-dev(dot)com
http://www.elevated-dev.com/
(303) 722-0567 voice

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Guillaume Lelarge 2012-02-25 18:10:09 Re: Problems with pg_restore (plpgsql already exists)
Previous Message Brian Weaver 2012-02-25 16:18:24 Re: Problems with pg_restore (plpgsql already exists)