Re: COMMUTATOR doesn't seem to work

From: D'Arcy Cain <darcy(at)druid(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: COMMUTATOR doesn't seem to work
Date: 2012-06-22 03:43:27
Message-ID: 4FE3E9DF.7080906@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12-06-21 12:18 PM, Tom Lane wrote:
> Did you actually create a "text = chkpass" function and operator?
> This declaration merely promises that you will provide one eventually.
> The system does not have the ability to make one for you.

I guess I am missing the point of COMMUTATOR then. The docs say "When
you are defining a self-commutative operator, you just do it." It
seems you need to do more than "just do it." As far as I can tell I
will need to add another C function and another CREATE OPERATOR.
Then I can create an operator that takes args (text, chkpass) instead
of (chkpass, text). What is the COMMUTATOR for then? Is it just a
hint to the planner?

--
D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
IM: darcy(at)Vex(dot)Net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2012-06-22 04:03:16 Re: Skip checkpoint on promoting from streaming replication
Previous Message Shigeru HANADA 2012-06-22 01:06:53 Re: [PATCH] Allow breaking out of hung connection attempts