{"Entry":{"collection":"sql","key":"alter-operator","name":"ALTER OPERATOR","aliases":["alteroperator"],"metadata":{"aliases":["alteroperator"],"changed_in":["9.0","9.1","9.5","9.6","14","17"],"changes":[{"from":"7.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"8.0"},{"from":"8.0","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","parameters"],"removed":[]},"status":"changed","synopsis":null,"to":"8.1"},{"from":"8.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER OPERATOR name ( { left_type | NONE } , { right_type | NONE } ) OWNER TO new_owner"],"removed":["ALTER OPERATOR name ( { lefttype | NONE } , { righttype | NONE } ) OWNER TO newowner"]},"to":"9.0"},{"from":"9.0","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER OPERATOR name ( { left_type | NONE } , { right_type | NONE } ) SET SCHEMA new_schema"],"removed":[]},"to":"9.1"},{"from":"9.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":{"added":["OWNER TO { new_owner | CURRENT_USER | SESSION_USER }"],"removed":[]},"to":"9.5"},{"from":"9.5","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","parameters","examples"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER OPERATOR name ( { left_type | NONE } , { right_type | NONE } )","SET ( {  RESTRICT = { res_proc | NONE }","| JOIN = { join_proc | NONE }","} [, ... ] )"],"removed":[]},"to":"9.6"},{"from":"13","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }"],"removed":["ALTER OPERATOR name ( { left_type | NONE } , { right_type | NONE } )","ALTER OPERATOR name ( { left_type | NONE } , { right_type | NONE } )","ALTER OPERATOR name ( { left_type | NONE } , { right_type | NONE } )"]},"to":"14"},{"from":"15","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"16"},{"from":"16","purpose_changed":false,"renamed":null,"sections":{"added":["notes"],"changed":["parameters","examples"],"removed":[]},"status":"changed","synopsis":{"added":["| COMMUTATOR = com_op","| NEGATOR = neg_op","| HASHES","| MERGES"],"removed":[]},"to":"17"}],"content_hash":"06f87db91b49a05a7310ae105d15f38f528712da99df2215e642fd4b505f2beb","derived_content_hash":"db1eeb2735dae6b546abf40e7efd0360336a5a37eafd230a5f5d885f88b3ef88","editorial":{},"first_version":"8.0","group":"type","imported_at":"2026-09-30T17:43:37.523795+08:00","last_version":"20","name":"ALTER OPERATOR","object":"OPERATOR","position":3012,"present_in":["8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"change the definition of an operator","purpose_zh":"","related":["create-operator","drop-operator"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:ecba0f60dea7c54c6fce943c0abbb0fdb6a7b4de36ac572fa8b54c7861f5f267","receipt_sha256":"02f394abf14a556e96f88435046e104dab16b29b6469569a109f611ad955e5f3","repair":"wiki-repair-20261023"},"slug":"alter-operator","source_rev":"wiki-repair-20261023:9073532e8b9ce9d0be4905a7faafc6dbe2c19fe22801b4680318e4cab56c5c3b","synopsis":"ALTER OPERATOR name ( { left_type | NONE } , right_type )\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET SCHEMA new_schema\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET ( { RESTRICT = { res_proc | NONE }\n| JOIN = { join_proc | NONE }\n| COMMUTATOR = com_op\n| NEGATOR = neg_op\n| HASHES\n| MERGES\n} [, ... ] )","verb":"ALTER"}},"Definition":{"Collection":"sql","Key":"alter-operator","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"alter-operator","SourceRevision":"wiki-repair-20261023:9073532e8b9ce9d0be4905a7faafc6dbe2c19fe22801b4680318e4cab56c5c3b","Facts":{"anchor":"SQL-ALTEROPERATOR","description_zh":"更改一个操作符的定义","description_zh_html":"\u003cpre\u003eALTER OPERATOR name ( { left_type | NONE } , right_type )\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET SCHEMA new_schema\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET ( { RESTRICT = { res_proc | NONE }\n| JOIN = { join_proc | NONE }\n| COMMUTATOR = com_op\n| NEGATOR = neg_op\n| HASHES\n| MERGES\n} [, ... ] )\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e 更改一个操作符的定义。\n  \u003c/p\u003e\u003cp\u003e\n   要使用 \u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e，你必须拥有该操作符。要修改拥有者，你必须能够对新拥有角色执行 \u003ccode class=\"literal\"\u003eSET ROLE\u003c/code\u003e，并且该角色必须在该操作符所在模式上具有 \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e 权限。（这些限制确保更改拥有者不会让你做到那些不能通过删除并重建该操作符来做到的事情。不过，超级用户始终可以更改任何操作符的所有权。）\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e参数\u003c/h2\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-1\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      一个现有操作符的名称（可以是模式限定的）。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-2\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该操作符左操作数的数据类型；如果该操作符没有左操作数，请写\n      \u003ccode class=\"literal\"\u003eNONE\u003c/code\u003e。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-3\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该操作符右操作数的数据类型。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-4\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该操作符的新拥有者。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-5\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该操作符的新模式。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-6\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eres_proc\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该操作符的限制选择率估算函数；写成 \u003ccode class=\"literal\"\u003eNONE\u003c/code\u003e 可移除现有的选择率估算器。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-7\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ejoin_proc\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该操作符的连接选择率估算函数；写成 \u003ccode class=\"literal\"\u003eNONE\u003c/code\u003e 可移除现有的选择率估算器。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-8\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该操作符的交换子。只有当该操作符当前没有交换子时，才能修改此项。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-9\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该操作符的求反器。只有当该操作符当前没有求反器时，才能修改此项。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-10\"\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eHASHES\u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      表示该操作符可以支持哈希连接。该属性只能启用，不能禁用。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_OPERATOR-VARLISTENTRY-11\"\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eMERGES\u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      表示该操作符可以支持归并连接。该属性只能启用，不能禁用。\n     \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e注解\u003c/h2\u003e\u003cp\u003e\n   更多信息请参见\u003ca class=\"xref\" href=\"/zh/docs/18/xoper.html\" title=\"36.14. 用户定义的操作符\"\u003e第 36.14 节\u003c/a\u003e和\u003ca class=\"xref\" href=\"/zh/docs/18/xoper-optimization.html\" title=\"36.15. 操作符优化信息\"\u003e第 36.15 节\u003c/a\u003e。\n  \u003c/p\u003e\u003cp\u003e\n   由于交换子总是成对出现、彼此互为交换子，\u003ccode class=\"literal\"\u003eALTER OPERATOR SET COMMUTATOR\u003c/code\u003e 也会把\n   \u003cem class=\"replaceable\"\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e 的交换子设置为目标操作符。同样，\u003ccode class=\"literal\"\u003eALTER OPERATOR SET NEGATOR\u003c/code\u003e 也会把\n   \u003cem class=\"replaceable\"\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e 的求反器设置为目标操作符。因此，你不仅必须拥有目标操作符，也必须拥有其交换子或求反器操作符。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e示例\u003c/h2\u003e\u003cp\u003e\n   更改类型 \u003ccode class=\"type\"\u003etext\u003c/code\u003e 上的自定义操作符 \u003ccode class=\"literal\"\u003ea @@ b\u003c/code\u003e 的拥有者：\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nALTER OPERATOR @@ (text, text) OWNER TO joe;\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003cp\u003e\n   更改类型 \u003ccode class=\"type\"\u003eint[]\u003c/code\u003e 上的自定义操作符 \u003ccode class=\"literal\"\u003ea \u0026amp;\u0026amp; b\u003c/code\u003e 的限制和连接选择率估算函数：\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nALTER OPERATOR \u0026amp;\u0026amp; (int[], int[]) SET (RESTRICT = _int_contsel, JOIN = _int_contjoinsel);\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003cp\u003e\n   将\u003ccode class=\"literal\"\u003e\u0026amp;\u0026amp;\u003c/code\u003e 操作符标记为其自身的交换子：\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nALTER OPERATOR \u0026amp;\u0026amp; (int[], int[]) SET (COMMUTATOR = \u0026amp;\u0026amp;);\n\u003c/pre\u003e\u003cp\u003e\n\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e\n   在 SQL 标准中没有 \u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e 语句。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan class=\"simplelist\"\u003e\u003ca class=\"xref\" href=\"/zh/docs/18/sql-createoperator.html\" title=\"CREATE OPERATOR\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE OPERATOR\u003c/span\u003e\u003c/a\u003e, \u003ca class=\"xref\" href=\"/zh/docs/18/sql-dropoperator.html\" title=\"DROP OPERATOR\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP OPERATOR\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","file":"sql-alteroperator.html","lang":"en","name":"ALTER OPERATOR","purpose":"change the definition of an operator","purpose_zh":"更改一个操作符的定义","related":["create-operator","drop-operator"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e changes the definition of an operator.\u003c/p\u003e\u003cp\u003eYou must own the operator to use \u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e. To alter the owner, you must be able to \u003ccode class=\"literal\"\u003eSET ROLE\u003c/code\u003e to the new owning role, and that role must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the operator's schema. (These restrictions enforce that altering the owner doesn't do anything you couldn't do by dropping and recreating the operator. However, a superuser can alter ownership of any operator anyway.)\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name (optionally schema-qualified) of an existing operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe data type of the operator's left operand; write \u003ccode class=\"literal\"\u003eNONE\u003c/code\u003e if the operator has no left operand.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe data type of the operator's right operand.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new owner of the operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new schema for the operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eres_proc\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe restriction selectivity estimator function for this operator; write NONE to remove existing selectivity estimator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ejoin_proc\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe join selectivity estimator function for this operator; write NONE to remove existing selectivity estimator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe commutator of this operator. Can only be changed if the operator does not have an existing commutator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe negator of this operator. Can only be changed if the operator does not have an existing negator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eHASHES\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eIndicates this operator can support a hash join. Can only be enabled and not disabled.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eMERGES\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eIndicates this operator can support a merge join. Can only be enabled and not disabled.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eRefer to \u003ca href=\"/docs/18/xoper.html\" title=\"36.14. User-Defined Operators\"\u003eSection 36.14\u003c/a\u003e and \u003ca href=\"/docs/18/xoper-optimization.html\" title=\"36.15. Operator Optimization Information\"\u003eSection 36.15\u003c/a\u003e for further information.\u003c/p\u003e\u003cp\u003eSince commutators come in pairs that are commutators of each other, \u003ccode class=\"literal\"\u003eALTER OPERATOR SET COMMUTATOR\u003c/code\u003e will also set the commutator of the \u003cem class=\"replaceable\"\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e to be the target operator. Likewise, \u003ccode class=\"literal\"\u003eALTER OPERATOR SET NEGATOR\u003c/code\u003e will also set the negator of the \u003cem class=\"replaceable\"\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e to be the target operator. Therefore, you must own the commutator or negator operator as well as the target operator.\u003c/p\u003e","key":"notes","title":"Notes"},{"html":"\u003cp\u003eChange the owner of a custom operator \u003ccode class=\"literal\"\u003ea @@ b\u003c/code\u003e for type \u003ccode class=\"type\"\u003etext\u003c/code\u003e:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER OPERATOR @@ (text, text) OWNER TO joe;\n\u003c/pre\u003e\u003cp\u003eChange the restriction and join selectivity estimator functions of a custom operator \u003ccode class=\"literal\"\u003ea \u0026amp;\u0026amp; b\u003c/code\u003e for type \u003ccode class=\"type\"\u003eint[]\u003c/code\u003e:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER OPERATOR \u0026amp;\u0026amp; (int[], int[]) SET (RESTRICT = _int_contsel, JOIN = _int_contjoinsel);\n\u003c/pre\u003e\u003cp\u003eMark the \u003ccode class=\"literal\"\u003e\u0026amp;\u0026amp;\u003c/code\u003e operator as being its own commutator:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER OPERATOR \u0026amp;\u0026amp; (int[], int[]) SET (COMMUTATOR = \u0026amp;\u0026amp;);\n\u003c/pre\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003eThere is no \u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/create-operator/?v=18\" title=\"CREATE OPERATOR\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE OPERATOR\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-operator/?v=18\" title=\"DROP OPERATOR\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP OPERATOR\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"ALTER OPERATOR \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ( { \u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e | NONE } , \u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e )\n    OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\n\nALTER OPERATOR \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ( { \u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e | NONE } , \u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e )\n    SET SCHEMA \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\n\nALTER OPERATOR \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ( { \u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e | NONE } , \u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e )\n    SET ( {  RESTRICT = { \u003cem class=\"replaceable\"\u003e\u003ccode\u003eres_proc\u003c/code\u003e\u003c/em\u003e | NONE }\n           | JOIN = { \u003cem class=\"replaceable\"\u003e\u003ccode\u003ejoin_proc\u003c/code\u003e\u003c/em\u003e | NONE }\n           | COMMUTATOR = \u003cem class=\"replaceable\"\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e\n           | NEGATOR = \u003cem class=\"replaceable\"\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e\n           | HASHES\n           | MERGES\n          } [, ... ] )","synopsis_text":"ALTER OPERATOR name ( { left_type | NONE } , right_type )\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET SCHEMA new_schema\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET ( { RESTRICT = { res_proc | NONE }\n| JOIN = { join_proc | NONE }\n| COMMUTATOR = com_op\n| NEGATOR = neg_op\n| HASHES\n| MERGES\n} [, ... ] )","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-alteroperator.html","sha256":"4735a5ecff3159b8616e48a23c79b2f6cff0f04096678b0eb6b09605dc1d8df7"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"alter-operator","SourceDatabase":"center","Version":"18","Locale":"en","Title":"ALTER OPERATOR","Summary":"change the definition of an operator","BodyHTML":"\u003cpre\u003eALTER OPERATOR name ( { left_type | NONE } , right_type )\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET SCHEMA new_schema\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET ( { RESTRICT = { res_proc | NONE }\n| JOIN = { join_proc | NONE }\n| COMMUTATOR = com_op\n| NEGATOR = neg_op\n| HASHES\n| MERGES\n} [, ... ] )\u003c/pre\u003e\u003csection\u003e\u003ch2\u003eDescription\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eALTER OPERATOR\u003c/code\u003e changes the definition of an operator.\u003c/p\u003e\u003cp\u003eYou must own the operator to use \u003ccode\u003eALTER OPERATOR\u003c/code\u003e. To alter the owner, you must be able to \u003ccode\u003eSET ROLE\u003c/code\u003e to the new owning role, and that role must have \u003ccode\u003eCREATE\u003c/code\u003e privilege on the operator\u0026#39;s schema. (These restrictions enforce that altering the owner doesn\u0026#39;t do anything you couldn\u0026#39;t do by dropping and recreating the operator. However, a superuser can alter ownership of any operator anyway.)\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eParameters\u003c/h2\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name (optionally schema-qualified) of an existing operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe data type of the operator\u0026#39;s left operand; write \u003ccode\u003eNONE\u003c/code\u003e if the operator has no left operand.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe data type of the operator\u0026#39;s right operand.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new owner of the operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new schema for the operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003eres_proc\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe restriction selectivity estimator function for this operator; write NONE to remove existing selectivity estimator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003ejoin_proc\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe join selectivity estimator function for this operator; write NONE to remove existing selectivity estimator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe commutator of this operator. Can only be changed if the operator does not have an existing commutator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe negator of this operator. Can only be changed if the operator does not have an existing negator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eHASHES\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eIndicates this operator can support a hash join. Can only be enabled and not disabled.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eMERGES\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eIndicates this operator can support a merge join. Can only be enabled and not disabled.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eNotes\u003c/h2\u003e\u003cp\u003eRefer to \u003ca href=\"/docs/18/xoper.html\" rel=\"nofollow\"\u003eSection 36.14\u003c/a\u003e and \u003ca href=\"/docs/18/xoper-optimization.html\" rel=\"nofollow\"\u003eSection 36.15\u003c/a\u003e for further information.\u003c/p\u003e\u003cp\u003eSince commutators come in pairs that are commutators of each other, \u003ccode\u003eALTER OPERATOR SET COMMUTATOR\u003c/code\u003e will also set the commutator of the \u003cem\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e to be the target operator. Likewise, \u003ccode\u003eALTER OPERATOR SET NEGATOR\u003c/code\u003e will also set the negator of the \u003cem\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e to be the target operator. Therefore, you must own the commutator or negator operator as well as the target operator.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eExamples\u003c/h2\u003e\u003cp\u003eChange the owner of a custom operator \u003ccode\u003ea @@ b\u003c/code\u003e for type \u003ccode\u003etext\u003c/code\u003e:\u003c/p\u003e\u003cpre\u003eALTER OPERATOR @@ (text, text) OWNER TO joe;\n\u003c/pre\u003e\u003cp\u003eChange the restriction and join selectivity estimator functions of a custom operator \u003ccode\u003ea \u0026amp;\u0026amp; b\u003c/code\u003e for type \u003ccode\u003eint[]\u003c/code\u003e:\u003c/p\u003e\u003cpre\u003eALTER OPERATOR \u0026amp;\u0026amp; (int[], int[]) SET (RESTRICT = _int_contsel, JOIN = _int_contjoinsel);\n\u003c/pre\u003e\u003cp\u003eMark the \u003ccode\u003e\u0026amp;\u0026amp;\u003c/code\u003e operator as being its own commutator:\u003c/p\u003e\u003cpre\u003eALTER OPERATOR \u0026amp;\u0026amp; (int[], int[]) SET (COMMUTATOR = \u0026amp;\u0026amp;);\n\u003c/pre\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eCompatibility\u003c/h2\u003e\u003cp\u003eThere is no \u003ccode\u003eALTER OPERATOR\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eSee Also\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/wiki/sql/create-operator/?v=18\" title=\"CREATE OPERATOR\" rel=\"nofollow\"\u003e\u003cspan\u003eCREATE OPERATOR\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-operator/?v=18\" title=\"DROP OPERATOR\" rel=\"nofollow\"\u003e\u003cspan\u003eDROP OPERATOR\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","SourceRevision":"wiki-repair-20261023:9073532e8b9ce9d0be4905a7faafc6dbe2c19fe22801b4680318e4cab56c5c3b","ContentHash":"b2aa6e3b69fac9d683b28cef2b39132e5e2723179b1ca25049b544381f08a0d6","Payload":{"related":["create-operator","drop-operator"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e changes the definition of an operator.\u003c/p\u003e\u003cp\u003eYou must own the operator to use \u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e. To alter the owner, you must be able to \u003ccode class=\"literal\"\u003eSET ROLE\u003c/code\u003e to the new owning role, and that role must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the operator's schema. (These restrictions enforce that altering the owner doesn't do anything you couldn't do by dropping and recreating the operator. However, a superuser can alter ownership of any operator anyway.)\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name (optionally schema-qualified) of an existing operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe data type of the operator's left operand; write \u003ccode class=\"literal\"\u003eNONE\u003c/code\u003e if the operator has no left operand.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe data type of the operator's right operand.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new owner of the operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new schema for the operator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eres_proc\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe restriction selectivity estimator function for this operator; write NONE to remove existing selectivity estimator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ejoin_proc\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe join selectivity estimator function for this operator; write NONE to remove existing selectivity estimator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe commutator of this operator. Can only be changed if the operator does not have an existing commutator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe negator of this operator. Can only be changed if the operator does not have an existing negator.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eHASHES\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eIndicates this operator can support a hash join. Can only be enabled and not disabled.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eMERGES\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eIndicates this operator can support a merge join. Can only be enabled and not disabled.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eRefer to \u003ca href=\"/docs/18/xoper.html\" title=\"36.14. User-Defined Operators\"\u003eSection 36.14\u003c/a\u003e and \u003ca href=\"/docs/18/xoper-optimization.html\" title=\"36.15. Operator Optimization Information\"\u003eSection 36.15\u003c/a\u003e for further information.\u003c/p\u003e\u003cp\u003eSince commutators come in pairs that are commutators of each other, \u003ccode class=\"literal\"\u003eALTER OPERATOR SET COMMUTATOR\u003c/code\u003e will also set the commutator of the \u003cem class=\"replaceable\"\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e to be the target operator. Likewise, \u003ccode class=\"literal\"\u003eALTER OPERATOR SET NEGATOR\u003c/code\u003e will also set the negator of the \u003cem class=\"replaceable\"\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e to be the target operator. Therefore, you must own the commutator or negator operator as well as the target operator.\u003c/p\u003e","key":"notes","title":"Notes"},{"html":"\u003cp\u003eChange the owner of a custom operator \u003ccode class=\"literal\"\u003ea @@ b\u003c/code\u003e for type \u003ccode class=\"type\"\u003etext\u003c/code\u003e:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER OPERATOR @@ (text, text) OWNER TO joe;\n\u003c/pre\u003e\u003cp\u003eChange the restriction and join selectivity estimator functions of a custom operator \u003ccode class=\"literal\"\u003ea \u0026amp;\u0026amp; b\u003c/code\u003e for type \u003ccode class=\"type\"\u003eint[]\u003c/code\u003e:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER OPERATOR \u0026amp;\u0026amp; (int[], int[]) SET (RESTRICT = _int_contsel, JOIN = _int_contjoinsel);\n\u003c/pre\u003e\u003cp\u003eMark the \u003ccode class=\"literal\"\u003e\u0026amp;\u0026amp;\u003c/code\u003e operator as being its own commutator:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER OPERATOR \u0026amp;\u0026amp; (int[], int[]) SET (COMMUTATOR = \u0026amp;\u0026amp;);\n\u003c/pre\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003eThere is no \u003ccode class=\"command\"\u003eALTER OPERATOR\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/create-operator/?v=18\" title=\"CREATE OPERATOR\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE OPERATOR\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-operator/?v=18\" title=\"DROP OPERATOR\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP OPERATOR\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","synopsis_html":"ALTER OPERATOR \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ( { \u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e | NONE } , \u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e )\n    OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\n\nALTER OPERATOR \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ( { \u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e | NONE } , \u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e )\n    SET SCHEMA \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\n\nALTER OPERATOR \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ( { \u003cem class=\"replaceable\"\u003e\u003ccode\u003eleft_type\u003c/code\u003e\u003c/em\u003e | NONE } , \u003cem class=\"replaceable\"\u003e\u003ccode\u003eright_type\u003c/code\u003e\u003c/em\u003e )\n    SET ( {  RESTRICT = { \u003cem class=\"replaceable\"\u003e\u003ccode\u003eres_proc\u003c/code\u003e\u003c/em\u003e | NONE }\n           | JOIN = { \u003cem class=\"replaceable\"\u003e\u003ccode\u003ejoin_proc\u003c/code\u003e\u003c/em\u003e | NONE }\n           | COMMUTATOR = \u003cem class=\"replaceable\"\u003e\u003ccode\u003ecom_op\u003c/code\u003e\u003c/em\u003e\n           | NEGATOR = \u003cem class=\"replaceable\"\u003e\u003ccode\u003eneg_op\u003c/code\u003e\u003c/em\u003e\n           | HASHES\n           | MERGES\n          } [, ... ] )","synopsis_text":"ALTER OPERATOR name ( { left_type | NONE } , right_type )\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET SCHEMA new_schema\n\nALTER OPERATOR name ( { left_type | NONE } , right_type )\nSET ( { RESTRICT = { res_proc | NONE }\n| JOIN = { join_proc | NONE }\n| COMMUTATOR = com_op\n| NEGATOR = neg_op\n| HASHES\n| MERGES\n} [, ... ] )"}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
