Postgresql 中文操作指南

ALTER CONVERSION

ALTER CONVERSION — 更改转换的定义

ALTER CONVERSION — change the definition of a conversion

Synopsis

ALTER CONVERSION name RENAME TO new_name
ALTER CONVERSION name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER CONVERSION name SET SCHEMA new_schema

Description

ALTER CONVERSION 会更改转换的定义。

ALTER CONVERSION changes the definition of a conversion.

您必须拥有该转换才能使用 ALTER CONVERSION 。若要更改所有者,您必须能够在 SET ROLE 中创建新的所有者角色,并且该角色必须对该转换的架构拥有 CREATE 权限。(这些限制会强制执行该操作:更改所有者不会执行任何您无法通过删除和重新创建转换来做的事情。不过,无论如何,超级用户可以更改任何转换的所有权)。

You must own the conversion to use ALTER CONVERSION. To alter the owner, you must be able to SET ROLE to the new owning role, and that role must have CREATE privilege on the conversion’s schema. (These restrictions enforce that altering the owner doesn’t do anything you couldn’t do by dropping and recreating the conversion. However, a superuser can alter ownership of any conversion anyway.)

Parameters

  • name

    • The name (optionally schema-qualified) of an existing conversion.

  • new_name

    • The new name of the conversion.

  • new_owner

    • The new owner of the conversion.

  • new_schema

    • The new schema for the conversion.

Examples

若要将转换 iso_8859_1_to_utf8 重命名为 latin1_to_unicode

To rename the conversion iso_8859_1_to_utf8 to latin1_to_unicode:

ALTER CONVERSION iso_8859_1_to_utf8 RENAME TO latin1_to_unicode;

若要将转换 iso_8859_1_to_utf8 的所有者更改为 joe

To change the owner of the conversion iso_8859_1_to_utf8 to joe:

ALTER CONVERSION iso_8859_1_to_utf8 OWNER TO joe;

Compatibility

SQL 标准中没有 ALTER CONVERSION 语句。

There is no ALTER CONVERSION statement in the SQL standard.