Fixing row comparison semantics

From: Gregory Maxwell <gmaxwell(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Fixing row comparison semantics
Date: 2005-12-26 20:12:48
Message-ID: e692861c0512261212n66cef794hbbe33f85633abf9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/26/05, Pavel Stehule <pavel(dot)stehule(at)hotmail(dot)com> wrote:
> (1,1) <* (1,2) = true
> (1,2) <* (2,1) is NULL
> (2,3) <* (1,2) = false
>
> it's usefull for multicriterial optimalisation

This is indeed a sane and useful function which should be adopted by
the SQL standard.. in postgresql this would easily enough be
implemented as a user function so I'm not sure we need special support
for it.

The idea is that in a multidimension comparison you can only sometimes
say when one tuple is strictly less than (or greater than) another
because differing dimensions are incomparable. So, like his example,
we can not say if (1,2) is lesser or greater than (2,1) because saying
so would require some priority of the dimensions which may not be
known or may not exist, it is only clear that they are not equal..

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devrim GUNDUZ 2005-12-26 20:38:56 Pushing init scripts into contrib/
Previous Message Pavel Stehule 2005-12-26 19:51:29 Re: Fixing row comparison semantics