ALTER SCHEMA <refpurpose>change the definition of a schema</refpurpose> — スキーマ定義を変更する
ALTER SCHEMAnameRENAME TOnew_nameALTER SCHEMAnameOWNER TO {new_owner| CURRENT_ROLE | CURRENT_USER | SESSION_USER }
<command>ALTER SCHEMA</command> changes the definition of a schema.
ALTER SCHEMAはスキーマ定義を変更します。
You must own the schema to use <command>ALTER SCHEMA</command>.
To rename a schema you must also have the
<literal>CREATE</literal> privilege for the database.
To alter the owner, you must be able to <literal>SET ROLE</literal> to the
new owning role, and that role must have the
<literal>CREATE</literal> privilege for the database.
(Note that superusers have all these privileges automatically.)
ALTER SCHEMAを使用するにはスキーマの所有者でなければなりません。
スキーマ名を変更するには、そのデータベースのCREATE権限を持たなければなりません。
所有者を変更するには、新しい所有者ロールに対してSET ROLEができなければなりません。また、そのロールがデータベースにおいてCREATE権限を持たなければなりません。
(スーパーユーザがこれらの権限をすべて自動的に持つことに注意してください。)
nameThe name of an existing schema. 既存のスキーマの名前です。
new_name
The new name of the schema. The new name cannot
begin with <literal>pg_</literal>, as such names
are reserved for system schemas.
新しいスキーマの名前です。
pg_から始まる名前は、システムスキーマとして予約されているため使用することができません。
new_ownerThe new owner of the schema. スキーマの新しい所有者です。
There is no <command>ALTER SCHEMA</command> statement in the SQL
standard.
標準SQLにはALTER SCHEMA文はありません。