Markus Bertheau <[EMAIL PROTECTED]> writes: > Is it possible to define or implement a type in PostgreSQL not all > values of which are comparable to each other?
Certainly, as long as you don't expect to be able to btree-index it, sort it, or DISTINCT it. (In theory we could probably handle DISTINCT using hash aggregation, as long as equality behaves sanely; but that's not implemented now.) Probably it'd be reasonable for the comparison operators to return NULL for a noncomparable pair of inputs. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match