Re: Fixing row comparison semantics

Martijn van Oosterhout <kleptog@svana.org>

From: Martijn van Oosterhout <kleptog@svana.org>
To: Pavel Stehule <pavel.stehule@hotmail.com>
Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, chriskl@familyhealth.com.au, pgsql-hackers@postgresql.org
Date: 2005-12-26T12:40:33Z
Lists: pgsql-hackers
On Mon, Dec 26, 2005 at 01:29:19PM +0100, Pavel Stehule wrote:
> Can we save current behave (with small modification) with other operator, 
> like <*
> 
> (1,1) <* (1,2) = true
> (1,2) <* (2,1) is NULL
> (2,3) <* (1,2) = false
> 
> it's usefull for multicriterial optimalisation

That's strange. That's not just doing less-than, but also
distinguishing between equal-to and greater-than. So at the very least
you've have to choose an operator like <=>.

Seems to me you should just define your own operator on an array type
and use that. I don't think the above could use an index scan for
speeding it up so there's no point trying to treat it specially.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.