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

From: "Regina Obe" <lr(at)pcorp(dot)us>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(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:52:40
Message-ID: 000001d953a3$055ee4e0$101caea0$@pcorp.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> "Regina Obe" <lr(at)pcorp(dot)us> writes:
> >> requires = 'extfoo, extbar'
> >> no_relocate = 'extfoo'
>
> > So when no_relocate is specified, where would that live?
>
> In the control file.
>
> > Would I mark the extfoo as not relocatable on CREATE / ALTER of said
> > extension?
> > Or add an extra field to pg_extension
>
> We don't record dependent extensions in pg_extension now, so that doesn't
> seem like it would fit well. I was envisioning that ALTER EXTENSION SET
> SCHEMA would do something along the lines of
>
> (1) scrape the list of dependent extensions out of pg_depend
> (2) open and parse each of their control files
> (3) fail if any of their control files mentions the target one in
> no_relocate.
>
> Admittedly, this'd be a bit slow, but I doubt that ALTER EXTENSION SET
> SCHEMA is a performance bottleneck for anybody.
>

Okay I'll move ahead with this approach.

Thanks,
Regina

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-03-10 23:00:55 Re: Add LZ4 compression in pg_dump
Previous Message Tom Lane 2023-03-10 22:49:54 Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken