Hello It is clear that '' is a bad integer or timestamp representation
but during the user input NULLs are usually represented with empty strings sometimes bunch of 'if empty' instructions grows huge (and in case of casting to timestamp apostrophes make sense) Why you prohibit casting ''::int to NULL ? What would you advice ? thnx ---------------------------(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