Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group