pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Abhijit Menon-Sen <ams@2ndQuadrant.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: dealing with extension dependencies that aren't quite 'e'
Date: Mon, 21 Mar 2016 12:04:40 +0530
Message-ID: <20160321063440.GA20891@toroid.org> (raw)
In-Reply-To: <20160319204625.GA318727@alvherre.pgsql>
References: <20160301012745.GA11489@toroid.org>
	<20160319204625.GA318727@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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 <x> 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



view thread (40+ messages)  latest in thread

Message-ID: <20160321063440.GA20891@toroid.org>
Permalink:  ../20160321063440.GA20891@toroid.org/
Also on:    postgresql.org/message-id/20160321063440.GA20891@toroid.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ams@2ndQuadrant.com, alvherre@2ndquadrant.com
  Subject: Re: dealing with extension dependencies that aren't quite 'e'
  In-Reply-To: <20160321063440.GA20891@toroid.org>

* 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