Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdQx0-00082s-N3 for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Aug 2016 23:54:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bdQx0-0006NW-4c for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Aug 2016 23:54:18 +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 1bdQvb-0004qp-IR for pgsql-hackers@postgresql.org; Fri, 26 Aug 2016 23:52:51 +0000 Received: from lists.commandprompt.com ([69.168.55.30]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bdQvX-0008Ff-09 for pgsql-hackers@postgresql.org; Fri, 26 Aug 2016 23:52:50 +0000 Received: from [192.168.1.60] (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id 01E332BE; Fri, 26 Aug 2016 16:52:42 -0700 (PDT) Received: from c-73-225-27-179.hsd1.wa.comcast.net ([73.225.27.179] helo=[192.168.1.60]) by assp.commandprompt.com with SMTPSA(TLSv1_2 ECDHE-RSA-AES128-GCM-SHA256) (2.5.1); 26 Aug 2016 16:52:42 -0700 Subject: Re: pg_dump with tables created in schemas created by extensions To: Tomas Vondra , Tom Lane , =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= References: <99581032-71de-6466-c325-069861f1947d@2ndquadrant.com> <20160824141559.GO4028@tamriel.snowman.net> <31878.1472251073@sss.pgh.pa.us> Cc: Michael Paquier , Stephen Frost , PostgreSQL-development From: "Joshua D. Drake" Organization: Command Prompt, Inc. Message-ID: <5f4ebb5d-21cd-690c-cfc6-f353e182fe61@commandprompt.com> Date: Fri, 26 Aug 2016 16:52:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Assp-Version: 2.5.1(16177) on assp.commandprompt.com X-Assp-ID: assp.commandprompt.com m1-55562-05099 X-Assp-Session: 7F85C8148648 (mail 1) X-Assp-Original-Subject: Re: [HACKERS] pg_dump with tables created in schemas created byextensions X-Assp-Client-SSL: yes X-Pg-Spam-Score: -2.1 (--) 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 On 08/26/2016 04:15 PM, Tomas Vondra wrote: > On 08/27/2016 12:37 AM, Tom Lane wrote: >> =?UTF-8?B?TWFydMOtbiBNYXJxdcOpcw==?= writes: >>> Looking at this issue today, I found that we are not setting a >>> dependency for an index created inside an extension. >> >> Surely the index has a dependency on a table, which depends on the >> extension? >> >> If you mean that you want an extension to create an index on a table >> that doesn't belong to it, but it's assuming pre-exists, I think >> that's just stupid and we need not support it. >> > > I don't see why that would be stupid (and I'm not sure it's up to us to > just decide it's stupid). +1, there are a lot of workflow patterns that make sense and don't make sense depending on your perspective, consider safe mode with MySQL. I personally think it is stupid too but it also obviously has a huge useful user base. > > Imagine you use extensions to break the application into modules. You > have a "basic" extension, with the table, and a "search" extension > implementing fulltext search on top of that table. Isn't it natural to > keep the gin indexes in the search extension? > > So the basic--1.0.sql will do something like > > CREATE TABLE x ( ...) > > and search--1.0.sql would do > > CREATE INDEX y ON x USING gin (z); > CREATE FUNCTION search_objects(..) ... > > because the index and function doing the search are somewhat tightly > coupled. I admit this is just an example and I don't know how many > people use extensions this way, but I don't see why this would be > inherently stupid pattern? It isn't and in fact shows that as we extend Pg, the more we allow people flexibility in developing WITHIN the database, the more we will be able to influence them to do so. That is a good thing. Or maybe we should just tell everyone, use an ORM it will solve all your problems. (/sarcasm) Sincerely, JD -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are honest with them. Unless otherwise stated, opinions are my own. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers