pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua D. Drake <jd@commandprompt.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Martín Marqués <martin@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_dump with tables created in schemas created by extensions
Date: Fri, 26 Aug 2016 16:52:42 -0700
Message-ID: <5f4ebb5d-21cd-690c-cfc6-f353e182fe61@commandprompt.com> (raw)
In-Reply-To: <dc56b3f1-830a-9401-c144-60b811494bec@2ndquadrant.com>
References: <99581032-71de-6466-c325-069861f1947d@2ndquadrant.com>
	<CAB7nPqSxgx=wywMbfmV-+0bGqc+03W9KWYCQU=PZVsJ7LvK9Mw@mail.gmail.com>
	<CAPdiE1w=+4QeLCJ3ijJW1HcUaDZsto_tE5ipJ+hYrzUvZsy6gg@mail.gmail.com>
	<CAPdiE1y1dKGw4RWwHN5VoTb6JgWaA_W1mFZJSLHVKxbPHUmCqA@mail.gmail.com>
	<CAB7nPqREUYBOWNoOHp7oyaMPVXfJmjLPFgTGh5i9qXjjRnYM+w@mail.gmail.com>
	<CAB7nPqSpU=xU_=biHc_DXKs0ZZ4whT7uXh5yEHJ01egFCQtH6A@mail.gmail.com>
	<20160824141559.GO4028@tamriel.snowman.net>
	<CAB7nPqQ9YeffQ3L9PYDRnA1EApk1_22d-fa43sVF7ao8af=EPA@mail.gmail.com>
	<CAPdiE1yxkGRnXjf7U9GUc7ctrf+7tt9wWYm8-gRoh6WeWVGHkw@mail.gmail.com>
	<CAB7nPqR12Re9Ai8xvi-aq61-MiWJiNN-F89zue8Z73gM0-cQSg@mail.gmail.com>
	<CAPdiE1wsPn-yko6NvoixWKh2P=ReMv=u=a+-saxLnDscFUFk2w@mail.gmail.com>
	<CAPdiE1zhfye5JRcW9wmuaYCPZ+OWABAT6g-6czOYBw5mstH-=g@mail.gmail.com>
	<31878.1472251073@sss.pgh.pa.us>
	<dc56b3f1-830a-9401-c144-60b811494bec@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 08/26/2016 04:15 PM, Tomas Vondra wrote:
> On 08/27/2016 12:37 AM, Tom Lane wrote:
>> =?UTF-8?B?TWFydMOtbiBNYXJxdcOpcw==?= <martin@2ndquadrant.com> 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



view thread (26+ messages)  latest in thread

Message-ID: <5f4ebb5d-21cd-690c-cfc6-f353e182fe61@commandprompt.com>
Permalink:  ../5f4ebb5d-21cd-690c-cfc6-f353e182fe61@commandprompt.com/
Also on:    postgresql.org/message-id/5f4ebb5d-21cd-690c-cfc6-f353e182fe61@commandprompt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: jd@commandprompt.com, tomas.vondra@2ndquadrant.com, tgl@sss.pgh.pa.us, martin@2ndquadrant.com, michael.paquier@gmail.com, sfrost@snowman.net
  Subject: Re: pg_dump with tables created in schemas created by extensions
  In-Reply-To: <5f4ebb5d-21cd-690c-cfc6-f353e182fe61@commandprompt.com>
  References: <99581032-71de-6466-c325-069861f1947d@2ndquadrant.com> <CAB7nPqSxgx=wywMbfmV-+0bGqc+03W9KWYCQU=PZVsJ7LvK9Mw@mail.gmail.com> <CAPdiE1w=+4QeLCJ3ijJW1HcUaDZsto_tE5ipJ+hYrzUvZsy6gg@mail.gmail.com> <CAPdiE1y1dKGw4RWwHN5VoTb6JgWaA_W1mFZJSLHVKxbPHUmCqA@mail.gmail.com> <CAB7nPqREUYBOWNoOHp7oyaMPVXfJmjLPFgTGh5i9qXjjRnYM+w@mail.gmail.com> <CAB7nPqSpU=xU_=biHc_DXKs0ZZ4whT7uXh5yEHJ01egFCQtH6A@mail.gmail.com> <20160824141559.GO4028@tamriel.snowman.net> <CAB7nPqQ9YeffQ3L9PYDRnA1EApk1_22d-fa43sVF7ao8af=EPA@mail.gmail.com> <CAPdiE1yxkGRnXjf7U9GUc7ctrf+7tt9wWYm8-gRoh6WeWVGHkw@mail.gmail.com> <CAB7nPqR12Re9Ai8xvi-aq61-MiWJiNN-F89zue8Z73gM0-cQSg@mail.gmail.com> <CAPdiE1wsPn-yko6NvoixWKh2P=ReMv=u=a+-saxLnDscFUFk2w@mail.gmail.com> <CAPdiE1zhfye5JRcW9wmuaYCPZ+OWABAT6g-6czOYBw5mstH-=g@mail.gmail.com> <31878.1472251073@sss.pgh.pa.us> <dc56b3f1-830a-9401-c144-60b811494bec@2ndquadrant.com> <5f4ebb5d-21cd-690c-cfc6-f353e182fe61@commandprompt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox