Re: CREATE EXTENSION BLOCKS
От | Tom Lane |
---|---|
Тема | Re: CREATE EXTENSION BLOCKS |
Дата | |
Msg-id | 11484.1365109878@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: CREATE EXTENSION BLOCKS ("David E. Wheeler" <david@justatheory.com>) |
Ответы |
Re: CREATE EXTENSION BLOCKS
(Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Re: CREATE EXTENSION BLOCKS ("David E. Wheeler" <david@justatheory.com>) |
Список | pgsql-hackers |
"David E. Wheeler" <david@justatheory.com> writes: > On Apr 3, 2013, at 11:41 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote: >> Right -- an extension is not considered to live within a schema, they >> are database-global. The objects might live in a particular schema (if >> it is "relocatable"), and there's support to move those to a different >> schema, but this doesn't affect the extension itself. > Thanks. I humbly submit this patch to help prevent silly questions like this in the future. I think this should be addressed in extend.sgml not only on the CREATE EXTENSION reference page. After thinking awhile I came up with the attached wording. Further wordsmithing anyone? regards, tom lane diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index 672d0df..bc1cd59 100644 *** a/doc/src/sgml/extend.sgml --- b/doc/src/sgml/extend.sgml *************** *** 359,364 **** --- 359,370 ---- extension.) Also notice that while a table can be a member of an extension, its subsidiary objects such as indexes are not directly considered members of the extension. + Another important point is that schemas can belong to extensions, but not + vice versa: an extension as such has an unqualified name and does not + exist <quote>within</> any schema. The extension's member objects, + however, will belong to schemas whenever appropriate for their object + types. It may or may not be appropriate for an extension to own the + schema(s) its member objects are within. </para> <sect2> diff --git a/doc/src/sgml/ref/create_extension.sgml b/doc/src/sgml/ref/create_extension.sgml index 4f3b9a5..9c9bf6f 100644 *** a/doc/src/sgml/ref/create_extension.sgml --- b/doc/src/sgml/ref/create_extension.sgml *************** CREATE EXTENSION [ IF NOT EXISTS ] <repl *** 94,99 **** --- 94,105 ---- If not specified, and the extension's control file does not specify a schema either, the current default object creation schema is used. </para> + <para> + 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. + </para> </listitem> </varlistentry>
В списке pgsql-hackers по дате отправления: