<synopsis>
CREATE OPERATOR <replaceable>name</replaceable> (
{FUNCTION|PROCEDURE} = <replaceable class="parameter">function_name</replaceable>
- [, LEFTARG = <replaceable class="parameter">left_type</replaceable> ] [, RIGHTARG = <replaceable class="parameter">right_type</replaceable> ]
+ [, LEFTARG = <replaceable class="parameter">left_type</replaceable> ] , RIGHTARG = <replaceable class="parameter">right_type</replaceable>
[, COMMUTATOR = <replaceable class="parameter">com_op</replaceable> ] [, NEGATOR = <replaceable class="parameter">neg_op</replaceable> ]
[, RESTRICT = <replaceable class="parameter">res_proc</replaceable> ] [, JOIN = <replaceable class="parameter">join_proc</replaceable> ]
[, HASHES ] [, MERGES ]
<para>
For binary operators, both <literal>LEFTARG</literal> and
- <literal>RIGHTARG</literal> must be defined. For prefix operators only
- <literal>RIGHTARG</literal> should be defined.
+ <literal>RIGHTARG</literal> must be defined. For prefix operators, only
+ <literal>RIGHTARG</literal> must be defined.
The <replaceable class="parameter">function_name</replaceable>
function must have been previously defined using <command>CREATE
FUNCTION</command> and must be defined to accept the correct number
<para>
<productname>PostgreSQL</productname> supports prefix
- and infix operators. Operators can be
+ and binary (or infix) operators. Operators can be
overloaded;<indexterm><primary>overloading</primary><secondary>operators</secondary></indexterm>
that is, the same operator name can be used for different operators
that have different numbers and types of operands. When a query is