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>, "'Gregory Stark (as CFM)'" <stark(dot)cfm(at)gmail(dot)com>, 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-16 10:14:18
Message-ID: 20230316101418.2a32erangr3nvnuk@c19
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 13, 2023 at 05:57:57PM -0400, Regina Obe wrote:
>
> Attached is a slightly revised patch to fix the extra whitespace in the
> extend.gml document that Sandro noted to me.

Thanks Regina.
I've tested attached patch (md5 0b652a8271fc7e71ed5f712ac162a0ef)
against current master (hash 4ef1be5a0b676a9f030cc2e4837f4b5650ecb069).
The patch applies cleanly, builds cleanly, regresses cleanly.

I've also run my quick test and I'm satisfied with it:

test=# create extension ext2 cascade;
NOTICE: installing required extension "ext1"
CREATE EXTENSION

test=# select ext2log('h');
ext1: ext2: h

test=# alter extension ext1 set schema n1;
ERROR: cannot SET SCHEMA of extension ext1 because other extensions prevent it
DETAIL: extension ext2 prevents relocation of extension ext1

test=# drop extension ext2;
DROP EXTENSION

test=# alter extension ext1 set schema n1;
ALTER EXTENSION

test=# create extension ext2;
CREATE EXTENSION

test=# select ext2log('h');
ext1: ext2: h

--strk;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-03-16 10:20:24 The use of atooid() on non-Oid results
Previous Message Amit Kapila 2023-03-16 10:00:37 Re: suppressing useless wakeups in logical/worker.c