From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Mario Weilguni <mweilguni(at)sime(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fwd: int type problem in 7.3 |
Date: | 2002-10-02 13:13:08 |
Message-ID: | 22054.1033564388@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Mario Weilguni <mweilguni(at)sime(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-10-02 13:17:19 | Re: (Fwd) Re: Any Oracle 9 users? A test please... |
Previous Message | Tom Lane | 2002-10-02 13:07:59 | Re: some more minor incompatibilties 7.2 <-> 7.3 |