Re: Fixing row comparison semantics

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Fixing row comparison semantics
Дата
Msg-id 200512260515.jBQ5FCO09783@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Fixing row comparison semantics  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Fixing row comparison semantics  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Список pgsql-hackers
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
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Fixing row comparison semantics
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and