Re: Is the COMMUTATOR clause required for self commutative operators?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: <btober(at)seaworthysys(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is the COMMUTATOR clause required for self commutative operators?
Date: 2003-12-08 22:25:59
Message-ID: 200312082325.59636.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

btober(at)seaworthysys(dot)com wrote:
> In the command
>
> CREATE OPERATOR name (
> PROCEDURE = func_name
> [, LEFTARG = lefttype ] [, RIGHTARG = righttype ]
> [, COMMUTATOR = com_op ] [, NEGATOR = neg_op ]
> [, RESTRICT = res_proc ] [, JOIN = join_proc ]
> [, HASHES ] [, MERGES ]
> [, SORT1 = left_sort_op ] [, SORT2 = right_sort_op ]
> [, LTCMP = less_than_op ] [, GTCMP = greater_than_op ]
> )
>
>
> Is omitting the COMMUTATOR option a problem at all in case of
> self-commutative operators?

It's an optimization clause, so if you omit it then you prevent certain
optimizations. See
http://www.postgresql.org/docs/current/static/xoper-optimization.html#AEN29826
for details.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2003-12-08 22:26:00 Re: Manual record locking
Previous Message btober 2003-12-08 22:06:35 Is the COMMUTATOR clause required for self commutative operators?