pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Maxim Boguk <maxim.boguk@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658
Date: Tue, 22 May 2012 22:14:48 -0400
Message-ID: <18762.1337739288@sss.pgh.pa.us> (raw)
In-Reply-To: <CAK-MWwQr6ZQca02Jf86c5qsw2ipaY9N_11DnSzo2u6CLCo0dXA@mail.gmail.com>
References: <E1SX08O-00085J-HA@wrigleys.postgresql.org>
	<18199.1337737564@sss.pgh.pa.us>
	<CAK-MWwQr6ZQca02Jf86c5qsw2ipaY9N_11DnSzo2u6CLCo0dXA@mail.gmail.com>

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



view thread (5+ messages)  latest in thread

Message-ID: <18762.1337739288@sss.pgh.pa.us>
Permalink:  ../18762.1337739288@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18762.1337739288@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, maxim.boguk@gmail.com
  Subject: Re: BUG #6662: Database do not push condition to subquery, test case for bug 6658
  In-Reply-To: <18762.1337739288@sss.pgh.pa.us>
  References: <E1SX08O-00085J-HA@wrigleys.postgresql.org> <18199.1337737564@sss.pgh.pa.us> <CAK-MWwQr6ZQca02Jf86c5qsw2ipaY9N_11DnSzo2u6CLCo0dXA@mail.gmail.com> <18762.1337739288@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox