Jim Nasby <[EMAIL PROTECTED]> writes: > What would be nice to add is the ability to perform that check more > easily. As of 8.1... > ... > if NEW=OLD then > ... > ERROR: operator does not exist: test = test > HINT: No operator matches the given name and argument type(s). You > may need to add explicit type casts.
Hmm, there seems to be some asymmetry in the handling, because it works for anonymous row constructors: regression=# select row(a.*) = row(a.*) from int8_tbl a; ERROR: operator does not exist: int8_tbl = int8_tbl LINE 1: select row(a.*) = row(a.*) from int8_tbl a; ^ HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. regression=# select row(a.q1,a.q2) = row(a.q1,a.q2) from int8_tbl a; ?column? ---------- t t t t t (5 rows) Someone oughta look into that... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match