3 PostgreSQL documentation
6 <refentry id=
"SQL-ALTEROPERATOR">
8 <refentrytitle id=
"SQL-ALTEROPERATOR-TITLE">ALTER OPERATOR
</refentrytitle>
9 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
13 <refname>ALTER OPERATOR
</refname>
14 <refpurpose>change the definition of an operator
</refpurpose>
17 <indexterm zone=
"sql-alteroperator">
18 <primary>ALTER OPERATOR
</primary>
23 ALTER OPERATOR
<replaceable>name
</replaceable> ( {
<replaceable>lefttype
</replaceable> | NONE } , {
<replaceable>righttype
</replaceable> | NONE } ) OWNER TO
<replaceable>newowner
</replaceable>
28 <title>Description
</title>
31 <command>ALTER OPERATOR
</command> changes the definition of
32 an operator. The only currently available functionality is to change the
33 owner of the operator.
37 You must own the operator to use
<command>ALTER OPERATOR<
/>.
38 To alter the owner, you must also be a direct or indirect member of the new
39 owning role, and that role must have
<literal>CREATE
</literal> privilege on
40 the operator's schema. (These restrictions enforce that altering the owner
41 doesn't do anything you couldn't do by dropping and recreating the operator.
42 However, a superuser can alter ownership of any operator anyway.)
47 <title>Parameters
</title>
51 <term><replaceable class=
"parameter">name
</replaceable></term>
54 The name (optionally schema-qualified) of an existing operator.
60 <term><replaceable class=
"parameter">lefttype
</replaceable></term>
63 The data type of the operator's left operand; write
64 <literal>NONE
</literal> if the operator has no left operand.
70 <term><replaceable class=
"parameter">righttype
</replaceable></term>
73 The data type of the operator's right operand; write
74 <literal>NONE
</literal> if the operator has no right operand.
80 <term><replaceable class=
"parameter">newowner
</replaceable></term>
83 The new owner of the operator.
91 <title>Examples
</title>
94 Change the owner of a custom operator
<literal>a @@ b
</literal> for type
<type>text
</type>:
96 ALTER OPERATOR @@ (text, text) OWNER TO joe;
102 <title>Compatibility
</title>
105 There is no
<command>ALTER OPERATOR
</command> statement in
111 <title>See Also
</title>
113 <simplelist type=
"inline">
114 <member><xref linkend=
"sql-createoperator" endterm=
"sql-createoperator-title"></member>
115 <member><xref linkend=
"sql-dropoperator" endterm=
"sql-dropoperator-title"></member>