pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: rene.vanpaassen@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6517: Volatile function erroneously optimized, does not consider change in schema path
Date: Mon, 12 Mar 2012 11:16:18 -0400
Message-ID: <27129.1331565378@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoa+HMFSbV9hZSTaO80AusxY1TFcrzQ-DCpg+jBO=Pq8+g@mail.gmail.com>
References: <E1S4WSm-0000yu-Mr@wrigleys.postgresql.org>
	<CA+Tgmoa+HMFSbV9hZSTaO80AusxY1TFcrzQ-DCpg+jBO=Pq8+g@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Mar 5, 2012 at 6:52 AM,  <rene.vanpaassen@gmail.com> wrote:
>> I found some unexpected behaviour when changing the schema search path in
>> combination with plpgsql functions (may be true for other function types
>> too, did not check). This occurs both in 9.1.2 (on Fedora, 64 bit) and 8.4.9
>> (Centos 6, 32 bit). I created a small example run with psql, to demonstrate
>> this.

> I have a vague feeling this is a known issue.  It sure seems like we
> should handle it better, but I'm not sure how hard that would be to
> implement.

plpgsql intentionally caches the plan for the query as it was built with
the original search_path.  There's been talk of adjusting that behavior
but I'm worried that we might break as many cases as we fix ...

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <27129.1331565378@sss.pgh.pa.us>
Permalink:  ../27129.1331565378@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27129.1331565378@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, robertmhaas@gmail.com, rene.vanpaassen@gmail.com
  Subject: Re: BUG #6517: Volatile function erroneously optimized, does not consider change in schema path
  In-Reply-To: <27129.1331565378@sss.pgh.pa.us>
  References: <E1S4WSm-0000yu-Mr@wrigleys.postgresql.org> <CA+Tgmoa+HMFSbV9hZSTaO80AusxY1TFcrzQ-DCpg+jBO=Pq8+g@mail.gmail.com> <27129.1331565378@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