Re: BUG #16698: Create extension and search path - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #16698: Create extension and search path
Date
Msg-id CAKFQuwYN2nsivt_LUhQ1zjugTZdQ2QiaX7DCZnRmxjSoKTvkNg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16698: Create extension and search path  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tue, Nov 3, 2020 at 10:50 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Miha Vrhovnik <miha.vrhovnik@gmail.com> writes:
> What are then extensions.. They live in some sort of limbo.. as they don't
> behave like a natural extension of the database... As they behave
> differently (because they "require" public shema in path if extensions are
> created while in public schema ).

You've got the wrong mental model.  Extensions are containers, which
may *contain* objects that live within schemas, but the extension itself
does not.  The key reason for doing it that way is that an extension might
itself contain a schema, or more than one schema.


Put a bit differently, extensions are global objects like roles.  With roles you grant permissions on individual databases for each role to access it.  For extensions you "create extension" within individual databases to enable the extension in each one - potentially making its components visible in a user-defined schema, but also the extension can use schemas in its own non-adjustable ways.

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: User with BYPASSRLS privilege can't change password
Next
From: "Liu, Huailing"
Date:
Subject: segfault with Parallel Scan