Re: Fixing row comparison semantics
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
- Cc: pgsql-hackers(at)postgresql(dot)org
- Subject: Re: Fixing row comparison semantics
- Date: Sat, 24 Dec 2005 09:53:05 -0500
- Message-id: <14907(dot)1135435985(at)sss(dot)pgh(dot)pa(dot)us>
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)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
Home |
Main Index |
Thread Index