Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658
Date
Msg-id 18762.1337739288@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658  (Maxim Boguk <maxim.boguk@gmail.com>)
Responses Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658  (Maxim Boguk <maxim.boguk@gmail.com>)
List pgsql-bugs
Maxim Boguk <maxim.boguk@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) before
making the volatility test, cf commit 5a86e5e19.  The reason the
subselect flattening code has difficulty with this case is that that
happens before function inlining does, so the expression still looks
volatile even though it really isn't.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Maxim Boguk
Date:
Subject: Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658
Next
From: Maxim Boguk
Date:
Subject: Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658