ALTER EXTENSION — change the definition of an extension 拡張の定義を変更する
ALTER EXTENSIONnameUPDATE [ TOnew_version] ALTER EXTENSIONnameSET SCHEMAnew_schemaALTER EXTENSIONnameADDmember_objectALTER EXTENSIONnameDROPmember_object<phrase>where <replaceable class="parameter">member_object</replaceable> is:</phrase> ここでmember_objectは以下の通りです。 ACCESS METHODobject_name| AGGREGATEaggregate_name(aggregate_signature) | CAST (source_typeAStarget_type) | COLLATIONobject_name| CONVERSIONobject_name| DOMAINobject_name| EVENT TRIGGERobject_name| FOREIGN DATA WRAPPERobject_name| FOREIGN TABLEobject_name| FUNCTIONfunction_name[ ( [ [argmode] [argname]argtype[, ...] ] ) ] | MATERIALIZED VIEWobject_name| OPERATORoperator_name(left_type,right_type) | OPERATOR CLASSobject_nameUSINGindex_method| OPERATOR FAMILYobject_nameUSINGindex_method| [ PROCEDURAL ] LANGUAGEobject_name| PROCEDUREprocedure_name[ ( [ [argmode] [argname]argtype[, ...] ] ) ] | ROUTINEroutine_name[ ( [ [argmode] [argname]argtype[, ...] ] ) ] | SCHEMAobject_name| SEQUENCEobject_name| SERVERobject_name| TABLEobject_name| TEXT SEARCH CONFIGURATIONobject_name| TEXT SEARCH DICTIONARYobject_name| TEXT SEARCH PARSERobject_name| TEXT SEARCH TEMPLATEobject_name| TRANSFORM FORtype_nameLANGUAGElang_name| TYPEobject_name| VIEWobject_name<phrase>and <replaceable>aggregate_signature</replaceable> is:</phrase> またaggregate_signatureは以下の通りです。 * | [argmode] [argname]argtype[ , ... ] | [ [argmode] [argname]argtype[ , ... ] ] ORDER BY [argmode] [argname]argtype[ , ... ]
   <command>ALTER EXTENSION</command> changes the definition of an installed
   extension.  There are several subforms:
ALTER EXTENSIONはインストールされた拡張の定義を変更します。
複数の副構文があります。
   
UPDATEThis 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 SCHEMAThis form moves the extension's objects into another schema. The extension has to be <firstterm>relocatable</firstterm> for this command to succeed. この構文は拡張のオブジェクトを別のスキーマに移動します。 このコマンドを成功させるためには、拡張は再配置可能でなければなりません。
ADD member_objectThis form adds an existing object to the extension. This is mainly useful in extension update scripts. The object will subsequently be treated as a member of the extension; notably, it can only be dropped by dropping the extension. この構文は既存のオブジェクトを拡張に追加します。 これは主に拡張の更新スクリプトで有用です。 オブジェクトはその後拡張のメンバとして扱われます。 特に、オブジェクトの削除は拡張の削除によってのみ可能です。
DROP member_objectThis 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 <xref linkend="extend-extensions"/> for more information about these operations. これらの操作の詳細については36.17を参照してください。
   You must own the extension to use <command>ALTER EXTENSION</command>.
   The <literal>ADD</literal>/<literal>DROP</literal> forms require ownership of the
   added/dropped object as well.
ALTER EXTENSIONを使用するためには拡張の所有者でなければなりません。
ADD/DROP構文では追加されるオブジェクトまたは削除されるオブジェクトの所有者でもなければなりません。
  
nameThe name of an installed extension. インストールされた拡張の名前です。
new_version
       The desired new version of the extension.  This can be written as
       either an identifier or a string literal.  If not specified,
       <command>ALTER EXTENSION UPDATE</command> attempts to update to whatever is
       shown as the default version in the extension's control file.
更新したい新しい拡張のバージョンです。
これは識別子または文字列リテラルのいずれかで記述することができます。
指定がない場合、ALTER EXTENSION UPDATEは拡張の制御ファイル内でデフォルトバージョンとして示されるものへの更新を試行します。
      
new_schemaThe new schema for the extension. 拡張の新しいスキーマです。
object_nameaggregate_namefunction_nameoperator_nameprocedure_nameroutine_nameThe 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, procedures, routines, sequences, text search objects, types, and views can be schema-qualified. 拡張に追加する、または、拡張から削除するオブジェクトの名前です。 テーブル、集約、ドメイン、外部テーブル、関数、演算子、演算子クラス、演算子族、プロシージャ、ルーチン、シーケンス、全文検索オブジェクト、型、ビューの名前はスキーマ修飾可能です。
source_typeThe name of the source data type of the cast. キャストの変換元データ型の名前です。
target_typeThe name of the target data type of the cast. キャストの変換先データ型の名前です。
argmode
       The mode of a function, procedure, or aggregate
       argument: <literal>IN</literal>, <literal>OUT</literal>,
       <literal>INOUT</literal>, or <literal>VARIADIC</literal>.
       If omitted, the default is <literal>IN</literal>.
       Note that <command>ALTER EXTENSION</command> does not actually pay
       any attention to <literal>OUT</literal> arguments, since only the input
       arguments are needed to determine the function's identity.
       So it is sufficient to list the <literal>IN</literal>, <literal>INOUT</literal>,
       and <literal>VARIADIC</literal> arguments.
関数、プロシージャ、または集約の引数のモードでIN、OUT、INOUT、VARIADICのいずれかです。
省略時のデフォルトはINです。
関数を識別するためには入力引数だけが必要ですので、実際のところALTER EXTENSIONはOUT引数を考慮しないことに注意してください。
このためIN、INOUTおよびVARIADIC引数を列挙するだけで十分です。
      
argname
       The name of a function, procedure, or aggregate argument.
       Note that <command>ALTER EXTENSION</command> does not actually pay
       any attention to argument names, since only the argument data
       types are needed to determine the function's identity.
関数、プロシージャ、または集約の引数の名前です。
関数を識別するためには入力引数だけが必要ですので、実際のところALTER EXTENSIONは引数名を考慮しないことに注意してください。
      
argtypeThe data type of a function, procedure, or aggregate argument. 関数、プロシージャ、または集約の引数のデータ型です。
left_typeright_type
       The data type(s) of the operator's arguments (optionally
       schema-qualified).  Write <literal>NONE</literal> for the missing argument
       of a prefix operator.
演算子の引数のデータ型(スキーマ修飾可)です。
前置演算子における存在しない引数にはNONEと記述してください。
      
PROCEDURALThis is a noise word. これは無意味な単語です。
type_nameThe name of the data type of the transform. 変換のデータ型の名前です。
lang_nameThe name of the language of the transform. 変換の言語の名前です。
   To update the <literal>hstore</literal> extension to version 2.0:
hstore拡張をバージョン2.0に更新します。
ALTER EXTENSION hstore UPDATE TO '2.0';
   To change the schema of the <literal>hstore</literal> extension
   to <literal>utils</literal>:
hstore拡張のスキーマをutilsに変更します。
ALTER EXTENSION hstore SET SCHEMA utils;
   To add an existing function to the <literal>hstore</literal> extension:
hstore拡張に既存の関数を追加します。
ALTER EXTENSION hstore ADD FUNCTION populate_record(anyelement, hstore);
   <command>ALTER EXTENSION</command> is a <productname>PostgreSQL</productname>
   extension.
ALTER EXTENSIONはPostgreSQLの拡張です。