Re: Fixing row comparison semantics
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Pavel Stehule" <pavel.stehule@hotmail.com>
Cc: pgman@candle.pha.pa.us, chriskl@familyhealth.com.au, pgsql-hackers@postgresql.org
Date: 2005-12-26T16:07:48Z
Lists: pgsql-hackers
"Pavel Stehule" <pavel.stehule@hotmail.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