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

From Regina Obe
Subject Ability to reference other extensions by schema in extension scripts
Date
Msg-id 003001d8f4ae$402282c0$c0678840$@pcorp.us
Whole thread Raw
Responses Re: Ability to reference other extensions by schema in extension scripts
List pgsql-hackers
I think I had brought this up a while ago, but I forget what the opinion was
on the matter.

PostGIS has a number of extensions that rely on it.  For the extensions that
are packaged with PostGIS, we force them all into the same schema except for
the postgis_topology and postgis_tiger_geocoder extensions which are already
installed in dedicated schemas.

This makes it impossible for postgis_topology and postgis_tiger_geocoder to
schema qualify their use of postgis.  Other extensions like pgRouting,
h3-pg, mobilitydb have similar issues.

My proposal is this.  If you think it's a good enough idea I can work up a
patch for this.

Extensions currently are allowed to specify a requires in the control file.

I propose to use this information, to allow replacement of phrases

@extschema_nameofextension@  as a variable, where nameofextension has to be
one of the extensions listed in the requires.

The extension plumbing will then use this information to look up the schema
that the current required extensions are installed in, and replace the
variables with the schema of where the dependent extension is installed.

Does anyone see any issue with this idea. 

Thanks,
Regina




pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: HOT chain validation in verify_heapam()
Next
From: Tom Lane
Date:
Subject: Re: Ability to reference other extensions by schema in extension scripts