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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658
Date: 2012-05-23 02:14:48
Message-ID: 18762.1337739288@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Maxim Boguk <maxim(dot)boguk(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Maxim Boguk 2012-05-23 02:18:47 Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658
Previous Message Maxim Boguk 2012-05-23 01:53:37 Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658