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

Re: Fixing row comparison semantics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us, chriskl(at)familyhealth(dot)com(dot)au, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fixing row comparison semantics
Date: 2005-12-26 16:07:48
Message-ID: 9884.1135613268@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com> writes:
>> Right now, '(a, b) < (1, 2)' is processed as 'a < 1 and b < 2', but
>> the SQL 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)'

> Can we save current behave (with small modification) with other operator, 
> like <*

Huh?  The only "current behavior" with other operators is failure:

regression=# select (1,1) <* (1,2);
ERROR:  operator <* is not supported for row expressions

In any case, you can get the equivalent of the current behavior by
writing out
	1 <* 1 AND 1 <* 2
so I don't see any strong need to support non-SQL-spec behaviors here.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-12-26 17:09:18
Subject: Improving "missing FROM-clause entry" message
Previous:From: Bruce MomjianDate: 2005-12-26 16:00:51
Subject: Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and

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