3 PostgreSQL documentation
6 <refentry id=
"SQL-ALTEROPERATOR">
8 <refentrytitle id=
"SQL-ALTEROPERATOR-TITLE">ALTER OPERATOR
</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
14 <refname>ALTER OPERATOR
</refname>
15 <refpurpose>change the definition of an operator
</refpurpose>
18 <indexterm zone=
"sql-alteroperator">
19 <primary>ALTER OPERATOR
</primary>
24 ALTER OPERATOR
<replaceable>name
</replaceable> ( {
<replaceable>lefttype
</replaceable> | NONE } , {
<replaceable>righttype
</replaceable> | NONE } ) OWNER TO
<replaceable>newowner
</replaceable>
29 <title>Description
</title>
32 <command>ALTER OPERATOR
</command> changes the definition of
33 an operator. The only currently available functionality is to change the
34 owner of the operator.
38 You must own the operator to use
<command>ALTER OPERATOR<
/>.
39 To alter the owner, you must also be a direct or indirect member of the new
40 owning role, and that role must have
<literal>CREATE
</literal> privilege on
41 the operator's schema. (These restrictions enforce that altering the owner
42 doesn't do anything you couldn't do by dropping and recreating the operator.
43 However, a superuser can alter ownership of any operator anyway.)
48 <title>Parameters
</title>
52 <term><replaceable class=
"parameter">name
</replaceable></term>
55 The name (optionally schema-qualified) of an existing operator.
61 <term><replaceable class=
"parameter">lefttype
</replaceable></term>
64 The data type of the operator's left operand; write
65 <literal>NONE
</literal> if the operator has no left operand.
71 <term><replaceable class=
"parameter">righttype
</replaceable></term>
74 The data type of the operator's right operand; write
75 <literal>NONE
</literal> if the operator has no right operand.
81 <term><replaceable class=
"parameter">newowner
</replaceable></term>
84 The new owner of the operator.
92 <title>Examples
</title>
95 Change the owner of a custom operator
<literal>a @@ b
</literal> for type
<type>text
</type>:
97 ALTER OPERATOR @@ (text, text) OWNER TO joe;
103 <title>Compatibility
</title>
106 There is no
<command>ALTER OPERATOR
</command> statement in
112 <title>See Also
</title>
114 <simplelist type=
"inline">
115 <member><xref linkend=
"sql-createoperator" endterm=
"sql-createoperator-title"></member>
116 <member><xref linkend=
"sql-dropoperator" endterm=
"sql-dropoperator-title"></member>