Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 6B2FA1AC5EFD for ; Thu, 5 Jul 2012 03:57:18 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Smg05-0006bx-2s for pgsql-bugs@postgresql.org; Thu, 05 Jul 2012 06:57:17 +0000 Received: by pbbrp8 with SMTP id rp8so12321831pbb.19 for ; Wed, 04 Jul 2012 23:57:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=OmNYehJ+TvC8awJm6QPCXh9gJH1t6V/eKHcifM3b3jk=; b=PD/hHlEoSOSJ6EqjXpi9w+5dSH38C+85isOi9m4oYuTXL7M/d4KiySMXlwznd6XaAR QItO+xqY/bfk+OKQbQ/k385cROEriySKeAbMLK5/RuxpB4p/+2KZruxQHMCM4FbPuw62 yUa+c4gYfx7SO9wqXV+BWTvsuBZ+1zffpg6I+s73Fnjb16NSo0/2T0OeA25hFCZUHSyK 8xdMow65vOBF/FG6w9cbVPA2VovwzC9g5Me1t6ODsdKsT+V+dg+jkx1+uYSP8cZhnudO zP9r27GVpXvT5kMuyzskukIy8tph4Ua1BEb4ZBfsDZQwFOnptfp0xrqaE5frIZzdgSnx Y+Xg== Received: by 10.68.221.227 with SMTP id qh3mr25404923pbc.115.1341471424323; Wed, 04 Jul 2012 23:57:04 -0700 (PDT) Received: from ayaki.localdomain (124-169-169-118.dyn.iinet.net.au. [124.169.169.118]) by mx.google.com with ESMTPS id iu6sm19202971pbc.35.2012.07.04.23.57.01 (version=SSLv3 cipher=OTHER); Wed, 04 Jul 2012 23:57:03 -0700 (PDT) Message-ID: <4FF53ABB.4060209@ringerc.id.au> Date: Thu, 05 Jul 2012 14:56:59 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: gary.haran@gmail.com CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6718: Cannot delete, create or check existence of extension References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkWq8bUmjaxoya7U1ekdlhmzAtS5kFrGC4mOwCBptJNhdtRbNWUeFoq0yMV43w6RrxRjMb/ X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/24 X-Sequence-Number: 33500 On 07/05/2012 02:05 AM, gary.haran@gmail.com wrote: > development=# create extension hstore; > ERROR: type "hstore" already exists > development=# drop extension hstore; > ERROR: extension "hstore" does not exist > development=# CREATE EXTENSION IF NOT EXISTS hstore; > ERROR: type "hstore" already exists First, thanks for the info in the report. At a guess, it has the hstore data type in it from before the extension system exists. You need to follow the upgrade instructions to convert it to an extension. This isn't a bug in that Pg is working as designed, though it's certainly not very nice user interface. See: http://www.postgresql.org/docs/9.1/static/sql-createextension.html specifically the "FROM old_version" clause, eg: CREATE EXTENSION hstore FROM unpackaged; (I think that's right; I haven't used the extension system in an upgrade). If you need more help please ask on pgsql-general as this doesn't appear to be a bug from the information supplied. However, I think "CREATE EXTENSION" should emit a HINT for already-exists errors, guiding people to info on how to upgrade the extension. I'm assuming the database "development" was loaded from a dump from an older version or was binary-upgraded from an older version. If it was created anew on 9.1, how did the "hstore" type get loaded? -- Craig Ringer