Re: function doesn't see change in search_path

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема Re: function doesn't see change in search_path
Дата
Msg-id 20111107202821.7185836b@dawn.webthatworks.it
обсуждение исходный текст
Ответ на Re: function doesn't see change in search_path  (Pavel Stehule <pavel.stehule@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Cody Caughlan
Дата:
Сообщение: pg_restore: [custom archiver] unexpected end of file on Postgres 9.1.1
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Www emulator