Re: BUG #16698: Create extension and search path

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Miha Vrhovnik <miha(dot)vrhovnik(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, PG Bug reporting form <noreply(at)postgresql(dot)org>
Subject: Re: BUG #16698: Create extension and search path
Date: 2020-11-03 20:46:06
Message-ID: CAKFQuwYN2nsivt_LUhQ1zjugTZdQ2QiaX7DCZnRmxjSoKTvkNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Nov 3, 2020 at 10:50 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Miha Vrhovnik <miha(dot)vrhovnik(at)gmail(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-11-04 00:22:14 Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
Previous Message Tom Lane 2020-11-03 20:05:39 Re: User with BYPASSRLS privilege can't change password