Re: Fixing row comparison semantics - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fixing row comparison semantics
Date
Msg-id 14907.1135435985@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixing row comparison semantics  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: Fixing row comparison semantics
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Can someone explain to me how:
> (a, b) < (1, 2)
> is different to
> a < 1 and b < 2

Right at the moment our code interprets it that way, but this behavior
is wrong per spec.  It should be an ordered column-by-column comparison,
so that the equivalent simple expression is
(a < 1) OR (a = 1 AND b < 2)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fixing row comparison semantics
Next
From: Greg Stark
Date:
Subject: Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and