File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 352
352
extension.) Also notice that while a table can be a member of an
353
353
extension, its subsidiary objects such as indexes are not directly
354
354
considered members of the extension.
355
+ Another important point is that schemas can belong to extensions, but not
356
+ vice versa: an extension as such has an unqualified name and does not
357
+ exist <quote>within</> any schema. The extension's member objects,
358
+ however, will belong to schemas whenever appropriate for their object
359
+ types. It may or may not be appropriate for an extension to own the
360
+ schema(s) its member objects are within.
355
361
</para>
356
362
357
363
<sect2>
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ PostgreSQL documentation
22
22
<refsynopsisdiv>
23
23
<synopsis>
24
24
CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name</replaceable>
25
- [ WITH ] [ SCHEMA <replaceable class="parameter">schema </replaceable> ]
25
+ [ WITH ] [ SCHEMA <replaceable class="parameter">schema_name </replaceable> ]
26
26
[ VERSION <replaceable class="parameter">version</replaceable> ]
27
27
[ FROM <replaceable class="parameter">old_version</replaceable> ]
28
28
</synopsis>
@@ -85,7 +85,7 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name
85
85
</varlistentry>
86
86
87
87
<varlistentry>
88
- <term><replaceable class="parameter">schema </replaceable></term>
88
+ <term><replaceable class="parameter">schema_name </replaceable></term>
89
89
<listitem>
90
90
<para>
91
91
The name of the schema in which to install the extension's
@@ -94,6 +94,12 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name
94
94
If not specified, and the extension's control file does not specify a
95
95
schema either, the current default object creation schema is used.
96
96
</para>
97
+ <para>
98
+ Remember that the extension itself is not considered to be within any
99
+ schema: extensions have unqualified names that must be unique
100
+ database-wide. But objects belonging to the extension can be within
101
+ schemas.
102
+ </para>
97
103
</listitem>
98
104
</varlistentry>
99
105
You can’t perform that action at this time.
0 commit comments