Re: Ability to reference other extensions by schema in extension scripts - Mailing list pgsql-hackers

From Sandro Santilli
Subject Re: Ability to reference other extensions by schema in extension scripts
Date
Msg-id 20230228221355.beak4ip7uj7v4fnm@c19
Whole thread Raw
In response to RE: Ability to reference other extensions by schema in extension scripts  ("Regina Obe" <lr@pcorp.us>)
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Making empty Bitmapsets always be NULL
Next
From: Sandro Santilli
Date:
Subject: Re: Ability to reference other extensions by schema in extension scripts