From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryn Llewellyn <bryn@yugabyte.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: "create function... depends on extension..." not supported. Why?
Date: Tue, 26 Apr 2022 21:31:51 -0400
Message-ID: <294570.1651023111@sss.pgh.pa.us> (raw)
In-Reply-To: <89961B5A-92D2-4419-BB03-0D07DAD5037E@yugabyte.com>
References: <B6FB3DAF-08DE-4BC3-8744-3A051DF64280@yugabyte.com>
<CAKFQuwZ8HZf8oJ=e_gD6wrkzrJBesvaKPERvJVUdoSQ2kCruoQ@mail.gmail.com>
<89961B5A-92D2-4419-BB03-0D07DAD5037E@yugabyte.com>
Bryn Llewellyn <bryn@yugabyte.com> writes:
> The discussion has diverging threads and very many turns. I think that I managed to skim through the entire tree. As I read it, the discussion was entirely about the semantics of the proposed dependency of a function (or procedure) upon an extension. The idea to establish such a dependency using “alter function” came up quite early in the discussion. It seems that establishing it at “create function” time was never considered.
Probably not. Just for the record, it's not true that CREATE and ALTER
always have the same set of options. An obvious counterexample is that
you can't set the owner to someone different from yourself during CREATE.
There may be others.
I suppose that "DEPENDS ON EXTENSION" was modeled after the commands
to control extension membership, which likewise exist only in ALTER
form because CREATE's behavior for that is hard-wired. If you wanted
to hand-wave a lot, you could maybe claim that ownership and extension
membership/dependency are similar kinds of relationships and so it
makes sense that the command structures for manipulating them are
similar. But TBH that would probably be reverse-engineering an
explanation. I think that "we didn't bother" is more nearly the
situation.
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, bryn@yugabyte.com, david.g.johnston@gmail.com
Subject: Re: "create function... depends on extension..." not supported. Why?
In-Reply-To: <294570.1651023111@sss.pgh.pa.us>
References: <B6FB3DAF-08DE-4BC3-8744-3A051DF64280@yugabyte.com> <CAKFQuwZ8HZf8oJ=e_gD6wrkzrJBesvaKPERvJVUdoSQ2kCruoQ@mail.gmail.com> <89961B5A-92D2-4419-BB03-0D07DAD5037E@yugabyte.com> <294570.1651023111@sss.pgh.pa.us>
* 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