Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Date
Msg-id 25623.1418162623@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created  (cowwoc <cowwoc@bbs.darktech.org>)
Responses Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
List pgsql-bugs
cowwoc <cowwoc@bbs.darktech.org> writes:
> My application invokes:
>   DROP EXTENSION IF EXISTS hstore CASCADE
> followed by:
>   CREATE EXTENSION IF NOT EXISTS hstore SCHEMA public
> and I get:
> org.postgresql.util.PSQLException: ERROR: duplicate key value violates
> unique constraint "pg_extension_name_index"
>   Detail: Key (extname)=(hstore) already exists.

That's bizarre.  It sounds like there's something corrupt about your
pg_extension system catalog.  Does "select * from pg_extension" show
reasonable-looking data?  If so, try "REINDEX TABLE pg_extension".

            regards, tom lane

pgsql-bugs by date:

Previous
From: cowwoc
Date:
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Next
From: cowwoc
Date:
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created