Mario Weilguni <[EMAIL PROTECTED]> writes: > Ok, I checked this again. Up until 7.2, it was possible to compare an empty string >to a number, and it worked:: > e.g.: select * from mytable where int4id='' > worked fine, but delivered no result.
No, that was not what it did: in reality, the '' was silently taken as zero, and would match rows containing 0. That seems a very error-prone behavior (not to say a flat-out bug) to me. > But oracle accepts this one: > SQL> select * from re_eintraege where id=''; > no rows selected > because oracle treats the empty string as NULL Oracle does that for string data, but it doesn't do it for numerics does it? In any case, that behavior is surely non-compliant with the SQL spec. We were not compatible with Oracle on this behavior before, and I'm not very inclined to become so now. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster