Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZvH8-0004fV-9U for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2020 12:18:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kZvH6-0001KF-A8 for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2020 12:18:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZvH6-0001K7-4K for pgsql-bugs@lists.postgresql.org; Tue, 03 Nov 2020 12:18:56 +0000 Received: from meesny.iki.fi ([2001:67c:2b0:1c1::201]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZvH2-0002zr-Rn for pgsql-bugs@lists.postgresql.org; Tue, 03 Nov 2020 12:18:55 +0000 Received: from [192.168.1.113] (dsl-hkibng22-54faa4-119.dhcp.inet.fi [84.250.164.119]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 703B9205C3; Tue, 3 Nov 2020 14:18:47 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1604405927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OzxxWkTj1wRA8aKGIj/8YnqeT/R4+U3gHu1mC2Ytnm0=; b=le5Ov2mKPtInKGU2Wb6bt/+gmuRf5/6oR8g7H0AywAE5vOyA6cnRSWZEXK/UmAv3YKswzD 6AUMIhvboYASYic+3wskpQJMxYTze3/7Kq9HTWi4sS6uz/7PTk67CByWyrECjzryZ7mnvD dR8K61CjxdKQWzT3EZrOo79w8j93cKQ= Subject: Re: BUG #16698: Create extension and search path To: miha.vrhovnik@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form References: <16698-89213113705fc24a@postgresql.org> From: Heikki Linnakangas Message-ID: Date: Tue, 3 Nov 2020 14:18:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <16698-89213113705fc24a@postgresql.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1604405927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OzxxWkTj1wRA8aKGIj/8YnqeT/R4+U3gHu1mC2Ytnm0=; b=Fqb7BONSQtzzYoflszMONtuFUEMHnsrSv6OlDAEIzBw1Drdo1Eqt85kxs3AkzsVrVDonRU HhB3aPLpHgqjLVFbB7PLb/ExRpS7806h7dqkwMkCps67FUV2am2HT8oVcTpRdikAN5xMeZ u+hRhA0LibuEDku+qSqX0I35E3bNnBk= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1604405927; a=rsa-sha256; cv=none; b=hUAGuAbvysP0jsobn0bkSio3QycI0tfHPGmKdh+bfE7Ww00JACJE3MEtVzghD4lIej29r9 s6IU3s9wFJ6hZZzlYwDeaP+00RLiagNdn/+9IflWcG7BU8oQSFkQDG4NkI1/qQacfjVk// b1EqL6iA94D2U5VOTxldrpmaiX3zBSU= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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