Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: m(dot)sakrejda(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Date: 2012-07-04 21:37:03
Message-ID: 20120704213703.GH5578@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jul 02, 2012 at 01:28:36PM -0400, Bruce Momjian wrote:
> This is the trimmed-down code block:
>
> if (!binary_upgrade)
> {
> appendPQExpBuffer(q, "CREATE EXTENSION IF NOT EXISTS %s WITH SCHEMA %s;\n",
> qextname, fmtId(extinfo->namespace));
> }
> else
> {
> --> appendPQExpBuffer(q, "DROP EXTENSION IF EXISTS %s;\n", qextname);
> appendPQExpBuffer(q,
> "SELECT binary_upgrade.create_empty_extension(");
>
> The idea is that the IF NOT EXISTS and IF EXISTS are symmetric, which is
> my goal.
>
> > address the points I made about reproducing the previous state in cases
> > where the admin removed the language or changed its permissions.
>
> Well, it still does the create extension in binary mode like before ---
> not sure what the problem is.

Applied and back-patched to 9.2.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-07-05 04:21:58 Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Previous Message gary.haran 2012-07-04 18:05:07 BUG #6718: Cannot delete, create or check existence of extension