"Peter Headland" <pheadl...@actuate.com> writes: > While noodling around some more, I found that a comparison to '()' > allows use of the index, as does '(abc)' and even '(a(b(c)d)e)'. It > appears that mismatched open/close paren pairs trigger the > bug. Obviously something is parsing the string literal and mishandling > parentheses.
This isn't "obvious" at all, and in fact your theory is pretty much nonsense. What I think is happening is that '(' is a sufficiently common value that the planner thinks a seqscan is superior to an indexscan for it. However, since you have not shown us EXPLAIN output (much less EXPLAIN ANALYZE output), that's just a guess. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs