From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 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: Wed, 27 Apr 2022 11:32:07 +0200
Message-ID: <202204270932.puduanle4khz@alvherre.pgsql> (raw)
In-Reply-To: <294570.1651023111@sss.pgh.pa.us>
On 2022-Apr-26, Tom Lane wrote:
> 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.
IIRC Abhijit and I discussed this point offline, and our conclusion was
that DEPENDS ON EXTENSION was not of general enough usefulness to
warrant support for it in CREATE FUNCTION -- keeping in mind that we
would need support for it in CREATE INDEX, CREATE TRIGGER, CREATE
MATERIALIZED VIEW as well.
It's probably not that much code. The effort of writing the code wasn't
the barrier we were optimizing for, but rather for getting the whole
*idea* accepted.
If this feature is suddenly so useful as to *require* support in the
various CREATE commands, that is most satisfying to me and I volunteer
to reviewing patches that implement it.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
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: alvherre@alvh.no-ip.org, 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: <202204270932.puduanle4khz@alvherre.pgsql>
References: <294570.1651023111@sss.pgh.pa.us> <202204270932.puduanle4khz@alvherre.pgsql>
* 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