Thread

  1. Re: COMMUTATOR doesn't seem to work

    D'Arcy Cain <darcy@druid.net> — 2012-06-22T03:43:27Z

    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@druid.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@Vex.Net