From: | Miha Vrhovnik <miha(dot)vrhovnik(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, 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 17:10:09 |
Message-ID: | CAAjGE4roRjCHnn1mOccGB+dsjqJT2JxdOkCuVAh6Teo=91ZXWA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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 ).
If they would then this would work, but it doesn't.. and it requires fully
qualified names (OR public schema in set_path) which is annoying.
postgres=# CREATE DATABASE test;
CREATE DATABASE
postgres=# \c test
You are now connected to database "test" as user "postgres".
test=# SHOW search_path;
search_path
-----------------
"$user", public
(1 row)
test=# CREATE EXTENSION ltree;
CREATE EXTENSION
test=# CREATE SCHEMA foo1;
CREATE SCHEMA
test=# CREATE SCHEMA foo2;
CREATE SCHEMA
test=# SET search_path = foo1;
SET
test=# CREATE TABLE t(l ltree);
ERROR: type "ltree" does not exist
LINE 1: CREATE TABLE t(l ltree);
BR,
Miha
On Tue, 3 Nov 2020 at 15:36, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Miha Vrhovnik <miha(dot)vrhovnik(at)gmail(dot)com> writes:
> > I'm so sorry, but I do not understand... Even if I force the schema in
> > CREATE EXTENSION it still says that it already exists. (Tested on 12.4,
> but
> > it's the same with 13, as I have tested it before)
> > I'm missing something but the documentation doesn't state that I can only
> > install extension once per database.
>
> Extensions are not schema-qualified objects, so no, you cannot have
> more than one instance per database.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-11-03 17:44:11 | Re: User with BYPASSRLS privilege can't change password |
Previous Message | luis.roberto | 2020-11-03 17:06:08 | Re: segfault with incremental sort |