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

From Maxim Boguk
Subject Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658
Date
Msg-id CAK-MWwSQNbK8=Ufgnu8k0cToCcYgu3HamJRo3Ujgn89uJyg6bA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, May 23, 2012 at 12:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> 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
>



Thank you very much for all detailed explanation and all help.

Kind Regards,
Maksym

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658
Next
From: Pavel Stehule
Date:
Subject: Re: BUG #6626: union all with values of type "unknown"