Skip site navigation (1) Skip section navigation (2)

Re: pl/pgsql problem with search_path

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pl/pgsql problem with search_path
Date: 2003-09-07 21:59:36
Message-ID: 200309072159.h87LxaQ21779@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Gaetano Mendola wrote:
> "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> > Tom Lane wrote:
> > > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > > This highlights another problem with our plpgsql function caching.
> > >
> > > It's a little disturbing to think that any change in SEARCH_PATH might
> > > force us to discard all cached plans.  That could be expensive; and
> > > consider a function that deliberately sets SEARCH_PATH to ensure that
> > > it gets the tables it wants.  You wouldn't want such a function to be
> > > unable to cache any plans across calls (not to mention blowing away
> > > every other function's plans, too).
> > >
> > > We'd probably better record with each plan the SEARCH_PATH it was
> > > generated with.  Then, as long as that matches the current setting,
> > > we can re-use the plan.
> > >
> > > Of course, none of this is going to happen until someone gets around to
> > > creating infrastructure for flushing cached plans at need.  Right at the
> > > moment the answer is going to have to be "don't do that".
> >
> > Yep.  I was just surprised it highlighted another failure of cached
> > plans.
> 
> There is already a TODO for it ?

Yep:

        o Fix problems with complex temporary table creation/destruction
          without using PL/PgSQL EXECUTE, needs cache prevention/invalidation

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-bugs by date

Next:From: Theodore PetroskyDate: 2003-09-08 03:11:36
Subject: help with mac osx 10.2.6
Previous:From: Gaetano MendolaDate: 2003-09-07 17:19:08
Subject: Re: pl/pgsql problem with search_path

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group