pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <kgrittn@mail.com>
Cc: Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: wrong search_path being used
Date: Sat, 12 Jan 2013 14:29:38 -0500
Message-ID: <21642.1358018978@sss.pgh.pa.us> (raw)
In-Reply-To: <20130112185917.255770@gmx.com>
References: <20130112185917.255770@gmx.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

"Kevin Grittner" <kgrittn@mail.com> writes:
> To try to get your function code to work as you expect, the
> language would essentially need to identify which statements could
> be pre-planned, and which would needed to be treated as raw source
> on each execution. That would be tricky to implement, and would
> itself have some run-time cost. At this point we've put the burden
> on the programmer to identify this at the time the code is written,
> rather than adding run-time expense.

I think that the alternative most likely to succeed is to consider any
change in the active value of search_path as forcing replanning of
cached plans.  This wouldn't be that hard to implement but there's
a definite risk of loss of performance due to unnecessary replanning
(since the path change might or might not affect the particular query).
It's also not unlikely that it could break applications that work today,
because they depend -- perhaps without being aware of it -- on the
existing first-path-wins behavior.

Having said that, it seems likely that more people would prefer that
behavior than the existing one.  But it hasn't been clear enough to
justify making such a subtly incompatible change.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (15+ messages)  latest in thread

Message-ID: <21642.1358018978@sss.pgh.pa.us>
Permalink:  ../21642.1358018978@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21642.1358018978@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, kgrittn@mail.com, rr.rosas@gmail.com
  Subject: Re: wrong search_path being used
  In-Reply-To: <21642.1358018978@sss.pgh.pa.us>
  References: <20130112185917.255770@gmx.com> <21642.1358018978@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