Can anyone explain the ERROR below? Is this a bug or a feature?
This is 7.0.2.

test=# select (1,2,3) = (1,2,3);
 ?column? 
----------
 t
(1 row)

test=# select (1,2,3) = (1,2,9);
 ?column? 
----------
 f
(1 row)

test=# select (1,2,3) = (1,2,null);
 ?column? 
----------
 
(1 row)

test=# select (1,2,null) = (1,2,null);
ERROR:  Unable to identify an operator '=' for types 'unknown' and 'unknown'
	You will have to retype this query using an explicit cast
--
Tatsuo Ishii

Thu, 03 Aug 2000 10:09:07 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
comparing rows
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> test=# select (1,2,null) = (1,2,null);
> ERROR:  Unable to identify an operator '=' for types 'unknown' and 'unknown'
> 	You will have to retype this query using an explicit cast

Well, there's no basis for deciding what the datatype of the third
column is.

The only reason you don't get the same error from the non-row case

regression=# select null = null;
 ?column?
----------
 t
(1 row)

is that we have an ugly, horrible kluge in the parser to (mis) interpret
"foo = null" as meaning "foo ISNULL", in order to be compatible with
broken Microsoft SQL implementations.  If you try any other operator
you get

regression=# select null <> null;
ERROR:  Unable to identify an operator '<>' for types 'unknown' and 'unknown'
        You will have to retype this query using an explicit cast

I'd certainly not vote to propagate the "= null" kluge into the
row-equality code...

			regards, tom lane

Wed, 02 Aug 2000 21:36:38 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: comparing rows 