Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahtQS-0005yT-FV for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Mar 2016 06:34:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ahtQQ-0003iO-RC for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Mar 2016 06:34:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ahtQO-0003h7-TW for pgsql-hackers@postgresql.org; Mon, 21 Mar 2016 06:34:48 +0000 Received: from raven.toroid.org ([178.63.84.200]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahtQK-0000qy-Ok for pgsql-hackers@postgresql.org; Mon, 21 Mar 2016 06:34:47 +0000 Received: from kea.toroid.org (unknown [10.9.8.10]) by raven.toroid.org (Postfix) with ESMTP id C209CE5000D; Mon, 21 Mar 2016 07:34:41 +0100 (CET) Received: by kea.toroid.org (Postfix, from userid 1000) id A68514E0107; Mon, 21 Mar 2016 12:04:40 +0530 (IST) Date: Mon, 21 Mar 2016 12:04:40 +0530 From: Abhijit Menon-Sen To: Alvaro Herrera Cc: pgsql-hackers@postgresql.org Subject: Re: dealing with extension dependencies that aren't quite 'e' Message-ID: <20160321063440.GA20891@toroid.org> References: <20160301012745.GA11489@toroid.org> <20160319204625.GA318727@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160319204625.GA318727@alvherre.pgsql> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org At 2016-03-19 17:46:25 -0300, alvherre@2ndquadrant.com wrote: > > I don't think the first patch is acceptable standalone -- we need both > things together. OK. > But in reality, pg_depend handling is mixed up with other changes all > over the place. Yes, I noticed that. :-/ > Anyway I think this should be something along the lines of > ALTER FUNCTION foo() DEPENDS ON EXTENSION bar; OK. That's reasonable. > ALTER FUNCTION foo() OWNED BY EXTENSION bar; If the function is really OWNED BY EXTENSION, then the right way to declare it would seem to be ALTER EXTENSION … ADD FUNCTION. I prefer DEPENDS ON EXTENSION for this reason, there's no ambiguity about what we're declaring. > Another argument to focus only on extensions is that pg_dump knows > specifically about extensions for supressing objects to dump, and we > don't have any other object type doing the same kind of thing; so > perhaps extensions-only is fine. That's the argument that motivates this particular patch. I think if we have a DEPENDS ON EXTENSION framework, it (a) addresses the immediate need, and (b) gives us a straightforward way to add DEPENDS ON in future when we find some need for it. I'll write up a patch for this. Thanks for the suggestions. -- Abhijit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers