Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ0lH-00027n-2s for pgsql-bugs@postgresql.org; Thu, 15 Nov 2012 14:49:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ0lF-0004li-Ht for pgsql-bugs@postgresql.org; Thu, 15 Nov 2012 14:49:46 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qAFEnhsZ014883; Thu, 15 Nov 2012 09:49:43 -0500 (EST) From: Tom Lane To: Craig Ringer cc: Stuart Bishop , pgsql-bugs@postgresql.org Subject: Re: BUG #7661: pgstattuple from unpackaged fails on old installation In-reply-to: <50A4B334.9010209@2ndQuadrant.com> References: <50A48ED6.1070102@2ndQuadrant.com> <50A4B334.9010209@2ndQuadrant.com> Comments: In-reply-to Craig Ringer message dated "Thu, 15 Nov 2012 17:17:40 +0800" Date: Thu, 15 Nov 2012 09:49:42 -0500 Message-ID: <14882.1352990982@sss.pgh.pa.us> X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201211/78 X-Sequence-Number: 34636 Craig Ringer writes: > On 11/15/2012 03:32 PM, Stuart Bishop wrote: >>> That's a known issue with several of the extensions. You need to upgrade >>> the contrib module install to the current version, *then* wrap the >>> unpackaged contrib module into an extension with "FROM UNPACKAGED". >> Yeah, just thought I'd stick it in the... umm... bugtracker, as so far >> 'FROM unpackaged' has failed in 66% of up updates. Is the real >> solution is for the foo--unpackaged--1.0.sql script to recreate >> missing objects before adding them to the extension? > Extensions were created because upgrading DBs that used contrib modules > was a painful mess. Yeah. The goal we set ourselves when making the foo--unpackaged scripts was only to be able to upgrade from the immediately preceding form of the contrib module. I think it's probably true that in many cases adding CREATE OR REPLACE-type commands could allow upgrading from earlier versions as well. But it would be a lot of work to research what's needed and create/test a patch, and it would be work whose value lessens with every passing day. If there's somebody out there who's sufficiently annoyed to do that work, have at it. regards, tom lane