| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | m w <mttf2000(at)yahoo(dot)com> |
| Cc: | Hannu Krosing <hannu(at)tm(dot)ee>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Like vs '=' bug with indexing |
| Date: | 2001-02-04 18:59:12 |
| Message-ID: | 6702.981313152@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
m w <mttf2000(at)yahoo(dot)com> writes:
> Inconsistent behavior indicates that a different
> matching algorithm is used if one uses an index
> instead of a table scan. That scares me.
A seq scan and an index scan are inherently different algorithms,
so I don't see exactly how you think we can avoid this risk.
In particular, if you are dealing with a btree index and a "WHERE
column = constant" query, then a seq scan is only going to be concerned
with the behavior of the '=' operator --- does it return TRUE or not
for any particular row? But an index search is inherently going to make
ordered comparisons (<, =, >). So there is always a potential for
inconsistent behavior if the ordering operators produce results that are
inconsistent with simple '='. We cannot design that away --- all we can
do is fix such bugs when one is discovered in a particular datatype.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-02-04 19:12:06 | Re: Implementing an operator in C? |
| Previous Message | Tom Lane | 2001-02-04 18:45:27 | Re: Like vs '=' bug with indexing |