Re: BUG #16698: Create extension and search path

Поиск
Список
Период
Сортировка
От Miha Vrhovnik
Тема Re: BUG #16698: Create extension and search path
Дата
Msg-id CAAjGE4roRjCHnn1mOccGB+dsjqJT2JxdOkCuVAh6Teo=91ZXWA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #16698: Create extension and search path  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@sss.pgh.pa.us> wrote:
Miha Vrhovnik <miha.vrhovnik@gmail.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: luis.roberto@siscobra.com.br
Дата:
Сообщение: Re: segfault with incremental sort
Следующее
От: Tom Lane
Дата:
Сообщение: Re: User with BYPASSRLS privilege can't change password