Re: Allow relocatable extension to use @extschema@?

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow relocatable extension to use @extschema@?
Date: 2019-12-03 20:29:19
Message-ID: CAPpHfdsZvkikpRNcA41Qqvmncer20w1XLe=E=eWq_MoRXWVwEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 3, 2019 at 6:18 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
> > But nevertheless should we allow relocatable extension to use
> > @extschema(at)(dot) Any thoughts?
>
> No. The reasoning in the comment still holds good: if you embed
> @extschema@ in an object's definition, it becomes nonrelocatable.

I see, allowing @extschema@ in non-relocatable extension provides easy
way to shoot yourself in the foot.

However, it might be still useful to be able to distinguish extension
and core object in upgrade script of relocatable extensions. What
about (optional) way to set search_path to @extschema@, pg_catalog
instead of just @extschema(at)?

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-12-03 20:30:26 Re: [HACKERS] Block level parallel vacuum
Previous Message Masahiko Sawada 2019-12-03 20:28:09 Re: [HACKERS] Block level parallel vacuum