pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: miha.vrhovnik@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
Subject: Re: BUG #16698: Create extension and search path
Date: Tue, 3 Nov 2020 14:18:47 +0200
Message-ID: <b2e2d2a5-caa2-7141-dee1-ba7cfcb74fd8@iki.fi> (raw)
In-Reply-To: <16698-89213113705fc24a@postgresql.org>
References: <16698-89213113705fc24a@postgresql.org>

On 03/11/2020 09:57, PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      16698
> Logged by:          Miha Vrhovnik
> Email address:      miha.vrhovnik@gmail.com
> PostgreSQL version: 13.0
> Operating system:   Linux
> Description:
> 
> The documentation states, that I can use search_path to define in which
> schema the extension is going to be created, but this is clearly not
> true..

To be precise, the documentation for CREATE EXTENSION 
(https://www.postgresql.org/docs/current/sql-createextension.html) says:

> schema_name
> 
> The name of the schema in which to install the extension's objects,
> given that the extension allows its contents to be relocated. The
> named schema must already exist. If not specified, and the
> extension's control file does not specify a schema either, the
> current default object creation schema is used.
> 
> If the extension specifies a schema parameter in its control file,
> then that schema cannot be overridden with a SCHEMA clause. Normally,
> an error will be raised if a SCHEMA clause is given and it conflicts
> with the extension's schema parameter. However, if the CASCADE clause
> is also given, then schema_name is ignored when it conflicts. The
> given schema_name will be used for installation of any needed
> extensions that do not specify schema in their control files.
> 
> Remember that the extension itself is not considered to be within any
> schema: extensions have unqualified names that must be unique
> database-wide. But objects belonging to the extension can be within
> schemas.
The first paragraph says "schema in which to install the extension's 
*objects*" (emphasis mine). And the last paragraph explains this more 
explicitly.

- Heikki





view thread (8+ messages)  latest in thread

Message-ID: <b2e2d2a5-caa2-7141-dee1-ba7cfcb74fd8@iki.fi>
Permalink:  ../b2e2d2a5-caa2-7141-dee1-ba7cfcb74fd8@iki.fi/
Also on:    postgresql.org/message-id/b2e2d2a5-caa2-7141-dee1-ba7cfcb74fd8@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: hlinnaka@iki.fi, noreply@postgresql.org
  Subject: Re: BUG #16698: Create extension and search path
  In-Reply-To: <b2e2d2a5-caa2-7141-dee1-ba7cfcb74fd8@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox