From: Abhijit Menon-Sen <ams@2ndQuadrant.com>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: 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 16:49:59 +0530
Message-ID: <20160321111959.GA12784@toroid.org> (raw)
In-Reply-To: <CAPpHfdv8HFtkEHZOh-Z0i0o5L-dMmvHzhpybH68OaUyUSN9yQA@mail.gmail.com>
References: <20160301012745.GA11489@toroid.org>
<20160319204625.GA318727@alvherre.pgsql>
<20160321063440.GA20891@toroid.org>
<CAPpHfdv8HFtkEHZOh-Z0i0o5L-dMmvHzhpybH68OaUyUSN9yQA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
At 2016-03-21 13:04:33 +0300, a.korotkov@postgrespro.ru wrote:
>
> I'm not sure why we want to make new dependency type by ALTER FUNCTION
> command, not ALTER EXTENSION?
It's a matter of semantics. It means something very different than what
an 'e' dependency means. The extension doesn't own the function (and so
pg_dump shouldn't ignore it), but the function depends on the extension
(and so dropping the extension should drop it).
> The argument could be that 'x' dependency type would be used for other
> objects not extensions.
I suppose this is possible, but yes, I agree with you that it's not
clear how or why this would be useful.
> So, I would prefer this patch to extend ALTER EXTENSION command while
> it's aimed to this particular problem.
OK, so that's what the patch does, and it's certainly the simplest
approach for reasons discussed earlier (though perhaps not as clear
semantically as the ALTER FUNCTION approach). But:
> I even think we could extend existent grammar rule
>
> | ALTER EXTENSION name add_drop FUNCTION function_with_argtypes
> > *************** AlterExtensionContentsStmt:
> > *** 3982,3987 ****
> > --- 3987,3993 ----
> > n->objtype = OBJECT_FUNCTION;
> > n->objname = $6->funcname;
> > n->objargs = $6->funcargs;
> > + n->deptype = 'e';
> > $$ = (Node *)n;
> > }
How exactly do you propose to do this, i.e., what would the final
command to declare an 'x' dependency look like?
-- Abhijit
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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, a.korotkov@postgrespro.ru, alvherre@2ndquadrant.com
Subject: Re: dealing with extension dependencies that aren't quite 'e'
In-Reply-To: <20160321111959.GA12784@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