Re: BUG #4899: Open parenthesis breaks query plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4899: Open parenthesis breaks query plan
Дата
Msg-id 9589.1246808336@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #4899: Open parenthesis breaks query plan  ("Peter Headland" <pheadland@actuate.com>)
Ответы Re: BUG #4899: Open parenthesis breaks query plan  ("Peter Headland" <pheadland@actuate.com>)
Список pgsql-bugs
"Peter Headland" <pheadland@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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Diffrent column ordering after dump/restore tables with INHERITS
Следующее
От: "Steve Purcell"
Дата:
Сообщение: BUG #4901: Column name "window" breaks pg_dump/pg_restore