ALTER OPERATOR CLASS
更改一个操作符类的定义
英文手册覆盖始于 PostgreSQL 6.4. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
- anchor
- SQL-ALTEROPCLASS
- file
- sql-alteropclass.html
- lang
- en
- name
- ALTER OPERATOR CLASS
- purpose
- change the definition of an operator class
- purpose zh
- 未知
- sections same as
- 未知
- slug
- 18
语法
ALTER OPERATOR CLASS name USING index_method
RENAME TO new_name
ALTER OPERATOR CLASS name USING index_method
OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER OPERATOR CLASS name USING index_method
SET SCHEMA new_schema语法图
从左向右阅读;分支表示选择,旁路表示可选,循环表示重复。点击带下划线的参数可打开对应规则。
ALTER OPERATOR CLASS · 语法 2
ALTER OPERATOR CLASS · 语法 3
版本定义 PG 18
ALTER OPERATOR CLASS name USING index_method
RENAME TO new_name
ALTER OPERATOR CLASS name USING index_method
OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER OPERATOR CLASS name USING index_method
SET SCHEMA new_schema描述
ALTER OPERATOR CLASS更改一个操作符类的定义。
要使用ALTER OPERATOR CLASS,你必须拥有该操作符类。要更改拥有者,你必须能够对新的拥有角色执行SET ROLE,并且该角色必须在该操作符类所在的模式上具有CREATE权限。(这些限制确保更改拥有者不会做出任何你不能通过删除并重新创建该操作符类来完成的事情。不过,超级用户无论如何都可以更改任何操作符类的所有权。)
参数
name一个现有操作符类的名称(可以是模式限定的)。
index_method该操作符类所对应的索引方法的名称。
new_name该操作符类的新名称。
new_owner该操作符类的新拥有者。
new_schema该操作符类的新模式。
兼容性
SQL 标准中没有ALTER OPERATOR CLASS语句。
另见
CREATE OPERATOR CLASS, DROP OPERATOR CLASS, ALTER OPERATOR FAMILY比较版本
完整来源事实
synopsis html
ALTER OPERATOR CLASS <em class="replaceable"><code>name</code></em> USING <em class="replaceable"><code>index_method</code></em>
RENAME TO <em class="replaceable"><code>new_name</code></em>
ALTER OPERATOR CLASS <em class="replaceable"><code>name</code></em> USING <em class="replaceable"><code>index_method</code></em>
OWNER TO { <em class="replaceable"><code>new_owner</code></em> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER OPERATOR CLASS <em class="replaceable"><code>name</code></em> USING <em class="replaceable"><code>index_method</code></em>
SET SCHEMA <em class="replaceable"><code>new_schema</code></em>synopsis text
ALTER OPERATOR CLASS name USING index_method
RENAME TO new_name
ALTER OPERATOR CLASS name USING index_method
OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER OPERATOR CLASS name USING index_method
SET SCHEMA new_schema来源引用
定义来源
center · PostgreSQL 18 · a709ab85
正文语言: zh-Hans · 1b5ca64c