Re: "create function... depends on extension..." not supported. Why? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: "create function... depends on extension..." not supported. Why?
Date
Msg-id 202204270932.puduanle4khz@alvherre.pgsql
Whole thread Raw
In response to Re: "create function... depends on extension..." not supported. Why?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: "create function... depends on extension..." not supported. Why?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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/



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: range of composite types!
Next
From: Laurenz Albe
Date:
Subject: Re: Fresh eyeballs needed: input into error