[BUGS] BUG #6662: Database do not push condition to subquery, test case for bug 6658

2012-05-22 Thread maxim . boguk
The following bug has been logged on the website: Bug reference: 6662 Logged by: Maxim Boguk Email address: maxim.bo...@gmail.com PostgreSQL version: 9.1.3 Operating system: Linux Description: I managed create simple self-contained test case for 6658. create table

Re: [BUGS] BUG #6662: Database do not push condition to subquery, test case for bug 6658

2012-05-22 Thread Tom Lane
maxim.bo...@gmail.com writes: I managed create simple self-contained test case for 6658. This works fine in HEAD. The reason it doesn't work fine in 9.1 (or 9.0) is that in those branches, anytextcat() and textanycat() are marked volatile, for reasons that were good at the time but were

Re: [BUGS] BUG #6662: Database do not push condition to subquery, test case for bug 6658

2012-05-22 Thread Maxim Boguk
Hi, Thank you very much for answer. Explicit casting resolved an issue. Just single question: if anytextcat() and textanycat() are marked volatile, why the database allows create index on supposedly to be volatile expression: create index test_val_special on test((val || '')); ? P On Wed, May

Re: [BUGS] BUG #6662: Database do not push condition to subquery, test case for bug 6658

2012-05-22 Thread Tom Lane
Maxim Boguk maxim.bo...@gmail.com writes: if anytextcat() and textanycat() are marked volatile, why the database allows create index on supposedly to be volatile expression: create index test_val_special on test((val || '')); CREATE INDEX inlines anytextcat (which is just a SQL function)

Re: [BUGS] BUG #6662: Database do not push condition to subquery, test case for bug 6658

2012-05-22 Thread Maxim Boguk
On Wed, May 23, 2012 at 12:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: Maxim Boguk maxim.bo...@gmail.com writes: if anytextcat() and textanycat() are marked volatile, why the database allows create index on supposedly to be volatile expression: create index test_val_special on test((val ||