Re: Ability to reference other extensions by schema in extension scripts

From: Sandro Santilli <strk(at)kbt(dot)io>
To: Regina Obe <lr(at)pcorp(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ability to reference other extensions by schema in extension scripts
Date: 2023-02-28 22:13:55
Message-ID: 20230228221355.beak4ip7uj7v4fnm@c19
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Feb 25, 2023 at 03:40:24PM -0500, Regina Obe wrote:
> > On Mon, Feb 06, 2023 at 05:19:39AM -0500, Regina Obe wrote:
> >
> > I was thinking: how about using the "refobjsubid" to encode the "level" of
> > dependency on an extension ? Right now "refobjsubid" is always 0 when the
> > referenced object is an extension.
> > Could we consider subid=1 to mean the dependency is not only on the
> > extension but ALSO on it's schema location ?
>
> I like that idea. It's only been ever used for tables I think, but I don't
> see why it wouldn't apply in this case as the concept is kinda the same.
> Only concern if other parts rely on this being 0.

This has to be verified, yes. But it feels to me like "must be 0" was
mostly to _allow_ for future extensions like the proposed one.

> The other question, should this just update the existing DEPENDENCY_NORMAL
> extension or add a new DEPENDENCY_NORMAL between the extensions with
> subid=1?

I'd use the existing record.

--strk;

Libre GIS consultant/developer
https://strk.kbt.io/services.html

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sandro Santilli 2023-02-28 22:46:08 Re: Ability to reference other extensions by schema in extension scripts
Previous Message Tom Lane 2023-02-28 21:59:48 Making empty Bitmapsets always be NULL