Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAhqe-0007jJ-L9 for pgsql-bugs@arkaria.postgresql.org; Sat, 26 Nov 2016 18:37:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cAhqd-0004pQ-RX for pgsql-bugs@arkaria.postgresql.org; Sat, 26 Nov 2016 18:37:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cAhpy-00044i-Qs for pgsql-bugs@postgresql.org; Sat, 26 Nov 2016 18:36:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cAhpw-0006fo-FC for pgsql-bugs@postgresql.org; Sat, 26 Nov 2016 18:36:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uAQIaTkK014094; Sat, 26 Nov 2016 13:36:30 -0500 From: Tom Lane To: phb07 cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14434: Drop a table with a serial in an extension In-reply-to: References: <20161125151448.6529.33039@wrigleys.postgresql.org> <4135.1480121998@sss.pgh.pa.us> Comments: In-reply-to phb07 message dated "Sat, 26 Nov 2016 09:10:11 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <14092.1480185389.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sat, 26 Nov 2016 13:36:29 -0500 Message-ID: <14093.1480185389@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org phb07 writes: > Le 26/11/2016 à 01:59, Tom Lane a écrit : >> Don't see why that's a "workaround". You added the extension membership >> for the sequence explicitly, why wouldn't you expect to need to drop it >> explicitly? Seems to me the system is behaving properly. > Because depending on the way a table has been included in the extension > (either directly created inside the extension or first created outside > and then linked to the extension) the procedure to drop it some versions > later would be different. Well, no it wouldn't be, but nonetheless on closer study I think you're right that this is a bug. There is code in there that intends to make it unnecessary to issue "ALTER EXTENSION DROP member" when an extension update script drops a member object; it should be sufficient to just drop the object. It was failing to fire in this case because the drop was indirect, but it should work anyway. I've applied a patch for that. Thanks for the report! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs