SELECT COALESCE(dt, i) FROM (SELECT null AS dt, null AS i) q;
gives
ERROR: failed to find conversion function from unknown to text
********** Error **********
ERROR: failed to find conversion function from unknown to text
SQL state: XX000
So, I understand the datatype of 'null' is 'unknown', but what does 'text' have to do with it?
Mike