Tom Lane wrote:
> 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)
TODO updated:
* %Make row-wise comparisons work per SQL spec Right now, '(a, b) < (1, 2)' is processed as 'a < 1 and b < 2', but
theSQL standard requires it to be processed as a column-by-column comparison, so the proper comparison is '(a < 1) OR
(a= 1 AND b < 2)'
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square,
Pennsylvania19073