Re: [BUGS] BUG #6579: negative cost in a planning

2012-04-10 Thread Tom Lane
istvan.endr...@gmail.com writes: > there is a table with 3000 rows, and a custom index with a function. > This query gives negative cost: > select distinct name > from negativeCostBugReport t_ > where noaccent(t_.name) like 'B%' limit 10 Hm, interesting. The culprit seems to be the part of c

[BUGS] BUG #6579: negative cost in a planning

2012-04-10 Thread istvan . endredy
The following bug has been logged on the website: Bug reference: 6579 Logged by: Istvan Endredy Email address: istvan.endr...@gmail.com PostgreSQL version: 9.1.3 Operating system: linux Description: Hi, I've reduced the problem to this situation: there is a tabl

Re: [BUGS] BUG #6579: negative cost in a planning

2012-04-10 Thread Istvan Endredy
Hi, more precisely the given index looks like this: (to be able to repro the bug) CREATE INDEX negativecostbugreport_noaccent_idx ON negativeCostBugReport USING btree (noaccent(name) varchar_pattern_ops); i'm sorry, Istvan