Re: Better management of mergejoinable operators - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Better management of mergejoinable operators
Date
Msg-id 1394.1165991424@sss.pgh.pa.us
Whole thread Raw
In response to Re: Better management of mergejoinable operators  (Andrew - Supernews <andrew+nonews@supernews.com>)
List pgsql-hackers
Andrew - Supernews <andrew+nonews@supernews.com> writes:
> On 2006-12-13, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> BTW, I think it's possible to prove that there need never be two for the
>> case of both sides the same datatype.

> Counterexample even for a single data type: define an operator x =* y
> which is true when 2x = y.  This is mergejoinable using the following
> operators: SORT1 = <, SORT2 = <, LTCMP = (2x < y), RTCMP = (2x > y)
> (which is of course the same sortops as for regular =).

I think not --- the corresponding sort operators would have to be
"2x < y" etc, else the trichotomy law fails, and so do all standard
sort algorithms.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: LOCK_DEBUG breaks compile in 8.2 (and possibly later)
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Load distributed checkpoint