From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | m w <mttf2000(at)yahoo(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Like vs '=' bug with indexing |
Date: | 2001-02-03 22:27:49 |
Message-ID: | 4392.981239269@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
m w <mttf2000(at)yahoo(dot)com> writes:
> I think this exposes a bug in postgres where either
> index or table scans (I'm not sure which just yet)
> treat a zero differently than a non-zero in a varchar.
Embedded zeroes aren't supported in char/varchar/text fields,
and cannot be supported in a portable fashion, since these datatypes
rely on functions like strcoll() that don't allow embedded nulls in
strings. It wouldn't surprise me too much if there are inconsistent
behaviors between indexscans and seqscans for such invalid data.
It doesn't seem real practical for us to examine the output of every
C-coded function to make sure it produces a valid value of the datatype.
Illegal returned values are a fault of the function, and ensuing
misbehaviors are still its fault ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | m w | 2001-02-03 22:44:30 | Re: Like vs '=' bug with indexing |
Previous Message | m w | 2001-02-03 22:16:01 | Re: Like vs '=' bug with indexing |