Re: "create function... depends on extension..." not supported. Why?

From: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: "create function... depends on extension..." not supported. Why?
Date: 2022-04-27 01:20:46
Message-ID: 89961B5A-92D2-4419-BB03-0D07DAD5037E@yugabyte.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> david(dot)g(dot)johnston(at)gmail(dot)com wrote:
>
>> bryn(at)yugabyte(dot)com wrote:
>>
>> Note: I’m asking because the answer to the question “Why isn’t X supported?” is always useful. For example, if supporting it would imply a logical impossibility that I’m too slow to spot, it helps me when someone explains what I failed to realize. Equally, it helps me to know when the answer is “It’s just a historical accident. It could have been supported. But, now that it isn’t, it doesn’t seem worth the effort to bridge that gap” because this shows me that my existing mental model is sound.
>
> Here is the commit that brought the feature into existence (it includes a link to the archives for discussion from which you can read or infer things).
>
> https://github.com/postgres/postgres/commit/f2fcad27d59c8e5c48f8fa0a96c8355e40f24273

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.

Unless anybody corrects me, I’ll conclude that it’s perfectly feasible to establish the dependency at “create function” time. This would meet an obvious niceness goal (symmetry and guessability). It would also increase the possibility for component rule re-use in the presentation of the syntax rules. But I don’t s’pose that the effort of changing anything here would be cost-effective.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-04-27 01:31:51 Re: "create function... depends on extension..." not supported. Why?
Previous Message Rich Shepard 2022-04-27 01:09:42 Re: Fresh eyeballs needed: input into error [FIXED]