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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Regina Obe" <lr(at)pcorp(dot)us>
Cc: "'Gregory Stark \(as CFM\)'" <stark(dot)cfm(at)gmail(dot)com>, "'Sandro Santilli'" <strk(at)kbt(dot)io>, pgsql-hackers(at)lists(dot)postgresql(dot)org, "'Regina Obe'" <r(at)pcorp(dot)us>
Subject: Re: Ability to reference other extensions by schema in extension scripts
Date: 2023-03-10 22:14:36
Message-ID: 1012975.1678486476@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Regina Obe" <lr(at)pcorp(dot)us> writes:
>> If you want to work harder, perhaps a reasonable way to deal with the issue
>> would be to allow dependent extensions to declare that they don't want your
>> extension relocated. But I do not think it's okay to make that the default
>> behavior, much less the only behavior.

> - the main issue I ran into is I have to introduce another dependency type
> or go with Sandro's idea of using refsubobjid for this purpose.

No, pg_depend is not the thing to use for this. I was thinking of a new
field in the extension's control file, right beside where it says it's
dependent on such-and-such extensions in the first place. Say like

requires = 'extfoo, extbar'
no_relocate = 'extfoo'

> So you are proposing I change the execute_extension_scripts input args to
> take more args?

Why not? It's local to that file, so you won't break anything.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2023-03-10 22:32:17 Re: [PoC] Let libpq reject unexpected authentication requests
Previous Message Nathan Bossart 2023-03-10 22:02:56 Re: recovery modules