Re: function doesn't see change in search_path - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject Re: function doesn't see change in search_path
Date
Msg-id 20111107202821.7185836b@dawn.webthatworks.it
Whole thread Raw
In response to Re: function doesn't see change in search_path  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
On Mon, 7 Nov 2011 19:07:29 +0100
Pavel Stehule <pavel.stehule@gmail.com> wrote:

> 2011/11/7 Ivan Sergio Borgonovo <mail@webthatworks.it>:
> > On Mon, 7 Nov 2011 17:55:11 +0100
> > Pavel Stehule <pavel.stehule@gmail.com> wrote:
> >
> >> Hello
> >>
> >> this is know bug/feature based on caching plans
> >
> > What puzzled me is I'm operating in a similar way in a different
> > system and I'm not experiencing the same problem.
> >
> > Do different users have different caches?
>
> depend on usage - cache is per session

OK. It is clear it is "per session".
Up to my knowledge users can't be changed inside the same session.
What are you referring to with "depend on usage".
Is there any other thing that can influence cached plans?

Right now I just need a workaround and calling the function in
different sessions seems cleaner than writing a function for each
schema especially since I can use psql \connect.

It seems that cache management happens completely behind the scenes
and there are no way to control it other than playing tricks as

sql := 'select * from ' | sometable |...
execute sql;

I didn't find anything on cache other than what's written here

http://developer.postgresql.org/pgdocs/postgres/plpgsql-implementation.html

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


pgsql-general by date:

Previous
From: Cody Caughlan
Date:
Subject: pg_restore: [custom archiver] unexpected end of file on Postgres 9.1.1
Next
From: Raymond O'Donnell
Date:
Subject: Re: Www emulator