diff --git a/gpdb-doc/dita/client_tool_guides/common/client_sql_ref.xml b/gpdb-doc/dita/client_tool_guides/common/client_sql_ref.xml index ad89013c1ad763020870bb4913e893bd2f071909..d905a68a815db225041c4bf135c6e7009b7425fa 100644 --- a/gpdb-doc/dita/client_tool_guides/common/client_sql_ref.xml +++ b/gpdb-doc/dita/client_tool_guides/common/client_sql_ref.xml @@ -28,6 +28,11 @@

+

+ ALTER EXTENSION +
+

+

ALTER EXTERNAL TABLE
@@ -178,11 +183,15 @@

+

+ CREATE EXTENSION +
+

+

CREATE EXTERNAL TABLE
-

+

CREATE FUNCTION @@ -212,8 +221,7 @@
CREATE OPERATOR CLASS
-

+

CREATE PROTOCOL @@ -223,8 +231,7 @@
CREATE RESOURCE QUEUE
-

+

CREATE ROLE @@ -316,6 +323,11 @@

+

+ DROP EXTENSION +
+

+

DROP EXTERNAL TABLE
@@ -499,8 +511,7 @@
ROLLBACK TO SAVEPOINT
-

+

SAVEPOINT diff --git a/gpdb-doc/dita/ref_guide/GPReferenceSQLSummaryLOP.xml b/gpdb-doc/dita/ref_guide/GPReferenceSQLSummaryLOP.xml index 50ebc1db8bf1fe8e8d8c8840262947d6822d6c29..b68d57272610e0cec1e71381c71b6f278ac5956a 100644 --- a/gpdb-doc/dita/ref_guide/GPReferenceSQLSummaryLOP.xml +++ b/gpdb-doc/dita/ref_guide/GPReferenceSQLSummaryLOP.xml @@ -37,13 +37,20 @@

See for more information.

+
+ ALTER EXTENSION +
+

+ +

See for more + information.

ALTER EXTERNAL TABLE

-

See for more - information.

+

See for + more information.

ALTER FILESPACE
@@ -257,6 +264,13 @@

See for more information.

+
+ CREATE EXTENSION +
+

+ +

See for more + information.

CREATE EXTERNAL TABLE
@@ -464,6 +478,13 @@

See for more information.

+
+ DROP EXTENSION +
+

+ +

See for more + information.

DROP EXTERNAL TABLE
diff --git a/gpdb-doc/dita/ref_guide/ref_guide.ditamap b/gpdb-doc/dita/ref_guide/ref_guide.ditamap index 8af19ea338814863c92d2a1a80f3143371618deb..7638ec36215e212b6bece329faec2b6536f3d09b 100644 --- a/gpdb-doc/dita/ref_guide/ref_guide.ditamap +++ b/gpdb-doc/dita/ref_guide/ref_guide.ditamap @@ -9,6 +9,7 @@ + @@ -42,6 +43,7 @@ + @@ -73,6 +75,7 @@ + @@ -166,6 +169,8 @@ + + @@ -175,6 +180,7 @@ + @@ -184,6 +190,7 @@ + diff --git a/gpdb-doc/dita/ref_guide/sql_commands/ALTER_EXTENSION.xml b/gpdb-doc/dita/ref_guide/sql_commands/ALTER_EXTENSION.xml new file mode 100644 index 0000000000000000000000000000000000000000..99ffd56ba3e72217ab9a9283111e6ec90863ffee --- /dev/null +++ b/gpdb-doc/dita/ref_guide/sql_commands/ALTER_EXTENSION.xml @@ -0,0 +1,216 @@ + + + + ALTER EXTENSION + +

Change the definition of an extension that is registered in a Greenplum + database.

+
+ Synopsis + ALTER EXTENSION name UPDATE [ TO new_version ] +ALTER EXTENSION name SET SCHEMA new_schema +ALTER EXTENSION name ADD member_object +ALTER EXTENSION name DROP member_object + +where member_object is: + + ACCESS METHOD object_name | + AGGREGATE aggregate_name ( aggregate_signature ) | + CAST (source_type AS target_type) | + COLLATION object_name | + CONVERSION object_name | + DOMAIN object_name | + EVENT TRIGGER object_name | + FOREIGN DATA WRAPPER object_name | + FOREIGN TABLE object_name | + FUNCTION function_name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) | + MATERIALIZED VIEW object_name | + OPERATOR operator_name (left_type, right_type) | + OPERATOR CLASS object_name USING index_method | + OPERATOR FAMILY object_name USING index_method | + [ PROCEDURAL ] LANGUAGE object_name | + SCHEMA object_name | + SEQUENCE object_name | + SERVER object_name | + TABLE object_name | + TEXT SEARCH CONFIGURATION object_name | + TEXT SEARCH DICTIONARY object_name | + TEXT SEARCH PARSER object_name | + TEXT SEARCH TEMPLATE object_name | + TRANSFORM FOR type_name LANGUAGE lang_name | + TYPE object_name | + VIEW object_name + +and aggregate_signature is: + +* | [ argmode ] [ argname ] argtype [ , ... ] | + [ [ argmode ] [ argname ] argtype [ , ... ] ] + ORDER BY [ argmode ] [ argname ] argtype [ , ... ] +
+
+ Description +

ALTER EXTENSION changes the definition of an installed extension. These + are the subforms:

+ + + UPDATE + +

This form updates the extension to a newer version. The extension must supply a + suitable update script (or series of scripts) that can modify the currently-installed + version into the requested version.

+
+
+ + SET SCHEMA + +

This form moves the extension member objects into another schema. The extension must + be relocatable.

+
+
+ + ADD member_object + +

This form adds an existing object to the extension. This is useful in extension + update scripts. The added object is treated as a member of the extension. The object + can only be dropped by dropping the extension.

+
+
+ + DROP member_object + +

This form removes a member object from the extension. This is mainly useful in + extension update scripts. The object is not dropped, only disassociated from the + extension.

+
+
+
+

See Packaging Related Objects into an Extension for more + information about these operations.

+

You must own the extension to use ALTER EXTENSION. The + ADD and DROP forms also require ownership of the object + that is being added or dropped.

+
+
+ Parameters + + + name + +

The name of an installed extension.

+
+
+ + new_version + +

The new version of the extension. The new_version can be either an + identifier or a string literal. If not specified, the command attempts to update to + the default version in the extension control file.

+
+
+ + new_schema + +

The new schema for the extension.

+
+
+ + object_name + aggregate_name + function_name + operator_name + +

The name of an object to be added to or removed from the extension. Names of tables, + aggregates, domains, foreign tables, functions, operators, operator classes, operator + families, sequences, text search objects, types, and views can be + schema-qualified.

+
+
+ + source_type + +

The name of the source data type of the cast.

+
+
+ + target_type + +

The name of the target data type of the cast.

+
+
+ + argmode + +

The mode of a function or aggregate argument: IN, + OUT, INOUT, or VARIADIC. The + default is IN.

+

The command ignores the OUT arguments. Only the input arguments are + required to determine the function identity. It is sufficient to list the + IN, INOUT, and VARIADIC + arguments.

+
+
+ + argname + +

The name of a function or aggregate argument.

+

The command ignores argument names, since only the argument data types are required + to determine the function identity.

+
+
+ + argtype + +

The data type of a function or aggregate argument.

+
+
+ + left_type + right_type + +

The data types (optionally schema-qualified) of the operator arguments. Specify + NONE for the missing argument of a prefix or postfix operator.

+
+
+ + PROCEDURAL + +

This is a noise word.

+
+
+ + type_name + +

The name of the data type of the transform.

+
+
+ + lang_name + +

The name of the language of the transform.

+
+
+
+
+
+ Examples +

To update the hstore extension to version 2.0:

+ ALTER EXTENSION hstore UPDATE TO '2.0'; +

To change the schema of the hstore extension to + utils:

+ ALTER EXTENSION hstore SET SCHEMA utils; +

To add an existing function to the hstore extension:

+ ALTER EXTENSION hstore ADD FUNCTION populate_record(anyelement, hstore); +
+
+ Compatibility +

ALTER EXTENSION is a Greenplum Database extension.

+
+
+ See Also +

CREATE EXTENSION, + DROP EXTENSION

+
+ +
diff --git a/gpdb-doc/dita/ref_guide/sql_commands/CREATE_EXTENSION.xml b/gpdb-doc/dita/ref_guide/sql_commands/CREATE_EXTENSION.xml new file mode 100644 index 0000000000000000000000000000000000000000..b65c0b63c398fdc039826859da2530038e01f72e --- /dev/null +++ b/gpdb-doc/dita/ref_guide/sql_commands/CREATE_EXTENSION.xml @@ -0,0 +1,148 @@ + + + + CREATE EXTENSION + +

Registers an extension in a Greenplum database.

+
+ Synopsis + CREATE EXTENSION [ IF NOT EXISTS ] extension_name + [ WITH ] [ SCHEMA schema_name ] + [ VERSION version ] + [ FROM old_version ] + [ CASCADE ] +
+
+ Description +

CREATE EXTENSION loads a new extension into the current database. + There must not be an extension of the same name already loaded.

+

Loading an extension essentially amounts to running the extension script file. The + script typically creates new SQL objects such as functions, data types, operators + and index support methods. The CREATE EXTENSION command also + records the identities of all the created objects, so that they can be dropped again + if DROP EXTENSION is issued.

+

Loading an extension requires the same privileges that would be required to create + the component extension objects. For most extensions this means superuser or + database owner privileges are required. The user who runs CREATE + EXTENSION becomes the owner of the extension for purposes of later + privilege checks, as well as the owner of any objects created by the extension + script.

+
+
+ Parameters + + + IF NOT EXISTS + +

Do not throw an error if an extension with the same name already exists. + A notice is issued in this case. There is no guarantee that the existing + extension is similar to the extension that would have been installed. +

+
+
+ + extension_name + +

The name of the extension to be installed. The name must be unique within + the database. An extension is created from the details in the extension + control file + SHAREDIR/extension/extension_name.control.

+

SHAREDIR is the installation shared-data directory, + for example /usr/local/greenplum-db/share/postgresql. + The command pg_config --sharedir displays the + directory.

+
+
+ + SCHEMA schema_name + +

The name of the schema in which to install the extension objects. This + assumes that the extension allows its contents to be relocated. The + named schema must already exist. If not specified, and the extension + control file does not specify a schema, 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 is raised if a SCHEMA clause is + given and it conflicts with the extension schema parameter. However, if + the CASCADE clause is also given, then + schema_name is ignored when it conflicts. The + given schema_name is used for the installation of any + needed extensions that do not a specify schema in their control + files.

+

The extension itself is not within any schema: extensions have + unqualified names that must be unique within the database. But objects + belonging to the extension can be within a schema.

+
+
+ + VERSION version + +

The version of the extension to install. This can be written as either an + identifier or a string literal. The default version is value that is + specified in the extension control file.

+
+
+ + FROM old_version + +

Specify FROM old_version only if you + are attempting to install an extension that replaces an old-style + module that is a collection of objects that is not packaged into an + extension. If specified, CREATE EXTENSION runs an + alternative installation script that absorbs the existing objects into + the extension, instead of creating new objects. Ensure that + SCHEMA clause specifies the schema containing these + pre-existing objects.

+

The value to use for old_version is determined by the + extension author, and might vary if there is more than one version of + the old-style module that can be upgraded into an extension. For the + standard additional modules supplied with pre-9.1 PostgreSQL, specify + unpackaged for the old_version + when updating a module to extension style.

+
+
+ + CASCADE + +

Automatically install dependant extensions are not already installed. + Dependant extensions are checked recursively and those dependencies are + also installed automatically. If the SCHEMA clause is + specified, the schema applies to the extension and all dependant + extensions that are installed. Other options that are specified are not + applied to the automatically-installed dependant extensions. In + particular, default versions are always selected when installing + dependant extensions.

+
+
+
+
+
+ Notes +

The extensions currently available for loading can be identified from the pg_available_extensions or pg_available_extension_versions system views.

+

Before you use CREATE EXTENSION to load an extension into a + database, the supporting extension files must be installed including an extension + control file and at least one least one SQL script file. The support files must be + installed in the same location on all Greenplum Database hosts. For information + about creating new extensions, see PostgreSQL information about Packaging Related Objects into an + Extension.

+
+
+ Compatibility +

CREATE EXTENSION is a Greenplum Database extension.

+
+
+ See Also +

ALTER EXTENSION, + DROP + EXTENSION

+
+ +
diff --git a/gpdb-doc/dita/ref_guide/sql_commands/DROP_EXTENSION.xml b/gpdb-doc/dita/ref_guide/sql_commands/DROP_EXTENSION.xml new file mode 100644 index 0000000000000000000000000000000000000000..dad66a0fbb79bc0f8bf08ad9277fb1dc9103c85b --- /dev/null +++ b/gpdb-doc/dita/ref_guide/sql_commands/DROP_EXTENSION.xml @@ -0,0 +1,69 @@ + + + + DROP EXTENSION + +

Removes an extension from a Greenplum database.

+
+ Synopsis + DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] +
+
+ Description +

DROP EXTENSION removes extensions from the database. Dropping an extension + causes its component objects to be dropped as well.

+ The required supporting extension files what were installed to create the extension are + not deleted. The files must be manually removed from the Greenplum Database hosts. +

You must own the extension to use DROP EXTENSION.

+

This command fails if any of the extension objects are in use in the database. For example, + if a table is defined with columns of the extension type. Add the CASCADE + option to forcibly remove those dependent objects.

+ Before issuing a DROP EXTENSION with the + CASCADE keyword, you should be aware of all object that depend on the + extension to avoid unintended consequences. +
+
+ Parameters + + + IF EXISTS + +

Do not throw an error if the extension does not exist. A notice is issued.

+
+
+ + name + +

The name of an installed extension.

+
+
+ + CASCADE + +

Automatically drop objects that depend on the extension, and in turn all objects that + depend on those objects. See the PostgreSQL information about Dependency Tracking.

+
+
+ + RESTRICT + +

Refuse to drop an extension if any objects depend on it, other than the extension + member objects. This is the default.

+
+
+
+
+
+ Compatibility +

DROP EXTENSION is a Greenplum Database extension.

+
+
+ See Also +

CREATE EXTENSION, + ALTER EXTENSION

+
+ +
diff --git a/gpdb-doc/dita/ref_guide/system_catalogs/catalog_ref-views.xml b/gpdb-doc/dita/ref_guide/system_catalogs/catalog_ref-views.xml index 1e1724a078936ebdfd297b01c062241dc27009b4..b8a6dd8c40e4b31ea9469b9d0e926ebdee8fe2f0 100644 --- a/gpdb-doc/dita/ref_guide/system_catalogs/catalog_ref-views.xml +++ b/gpdb-doc/dita/ref_guide/system_catalogs/catalog_ref-views.xml @@ -25,8 +25,8 @@
  • -
  • pg_max_external_files (shows number of external table files allowed per segment host when - using the file protocol)
  • +
  • +
  • @@ -37,23 +37,24 @@
  • - +
  • +
  • pg_resqueue_status (Deprecated. Use gp_toolkit.gp_resqueue_status.)
  • - +
  • - +
  • -
  • pg_resqueue_status (Deprecated. Use gp_toolkit.gp_resqueue_status.)
  • -
  • pg_user_mappings (not supported)
  • session_level_memory_consumption (See "Viewing Session Memory Usage Information" in the - Greenplum Database Administrator Guide.)
  • + Greenplum Database Administrator Guide.) -

    For more information about the standard system views supported in PostgreSQL and Greenplum Database, see the following sections of the PostgreSQL documentation:

    +

    For more information about the standard system views supported in PostgreSQL and Greenplum + Database, see the following sections of the PostgreSQL documentation:

    • + + + pg_available_extension_versions + +

      The pg_available_extension_versions view lists the specific extension + versions that are available for installation. The pg_extension system catalog table + shows the extensions currently installed.

      +

      The view is read only.

      + + pg_catalog.pg_available_extension_versions + + + + + + + column + type + description + + + + + name + name + Extension name. + + + version + text + Version name. + + + installed + boolean + True if this version of this extension is + currently installed, False otherwise. + + + superuser + boolean + True if only superusers are allowed to install + the extension, False otherwise. + + + relocatable + boolean + True if extension can be relocated to another + schema, False otherwise. + + + schema + name + Name of the schema that the extension must be installed into, or + NULL if partially or fully relocatable. + + + requires + name[] + Names of prerequisite extensions, or NULL if + none + + + comment + text + Comment string from the extension control file. + + + +
      + +
      diff --git a/gpdb-doc/dita/ref_guide/system_catalogs/pg_available_extensions.xml b/gpdb-doc/dita/ref_guide/system_catalogs/pg_available_extensions.xml new file mode 100644 index 0000000000000000000000000000000000000000..8b7ecafe6af9319a6cf090d77b24d1f614af033a --- /dev/null +++ b/gpdb-doc/dita/ref_guide/system_catalogs/pg_available_extensions.xml @@ -0,0 +1,51 @@ + + + + pg_available_extensions + +

      The pg_available_extensions view lists the extensions that are available for + installation. The pg_extension + system catalog table shows the extensions currently installed.

      +

      The view is read only.

      + + pg_catalog.pg_available_extensions + + + + + + + column + type + description + + + + + name + name + Extension name. + + + default_version + text + Name of default version, or NULL if none is + specified. + + + installed_version + text + Currently installed version of the extension, or + NULL if not installed. + + + comment + text + Comment string from the extension control file. + + + +
      + +
      diff --git a/gpdb-doc/dita/ref_guide/system_catalogs/pg_extension.xml b/gpdb-doc/dita/ref_guide/system_catalogs/pg_extension.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b7dcb83efdbc155e626119cb7f3a486e6275223 --- /dev/null +++ b/gpdb-doc/dita/ref_guide/system_catalogs/pg_extension.xml @@ -0,0 +1,78 @@ + + + + pg_extension + +

      The system catalog table pg_extension stores information about installed + extensions.

      + + pg_catalog.pg_extension + + + + + + + + column + type + references + description + + + + + extname + name + + Name of the extension. + + + extowner + oid + pg_authid.oid + Owner of the extension + + + extnamespace + oid + pg_namespace.oid + Schema containing the extension exported objects. + + + extrelocatable + boolean + + True if the extension can be relocated to another schema. + + + extversion + text + + Version name for the extension. + + + extconfig + oid[] + pg_class.oid + Array of regclass OIDs for the extension + configuration tables, or NULL if none. + + + extcondition + text[] + + Array of WHERE-clause filter conditions for the + extension configuration tables, or NULL if none. + + + +
      +

      Unlike most catalogs with a namespace column, extnamespace does not imply + that the extension belongs to that schema. Extension names are never schema-qualified. The + extnamespace schema indicates the schema that contains most or all of the + extension objects. If extrelocatable is true, then this + schema must contain all schema-qualifiable objects that belong to the extension.

      + +
      diff --git a/gpdb-doc/dita/ref_guide/system_catalogs/pg_max_external_files.xml b/gpdb-doc/dita/ref_guide/system_catalogs/pg_max_external_files.xml new file mode 100644 index 0000000000000000000000000000000000000000..b50e475e8f8062cfe27a39df1d029bd70243882d --- /dev/null +++ b/gpdb-doc/dita/ref_guide/system_catalogs/pg_max_external_files.xml @@ -0,0 +1,43 @@ + + + + pg_max_external_files + +

      The pg_max_external_files view shows the maximum number of external table + files allowed per segment host when using the external table file + protocol.

      + + pg_catalog.pg_max_external_files + + + + + + + + column + type + references + description + + + + + hostname + name + + The host name used to access a particular segment instance on a + segment host. + + + maxfiles + bigint + + Number of primary segment instances on the host. + + + +
      + +