Re: Function does not see relations within schema it belongs to?

Поиск
Список
Период
Сортировка
От Alexander M. Pravking
Тема Re: Function does not see relations within schema it belongs to?
Дата
Msg-id 20040723220718.GE72022@dyatel.antar.bryansk.ru
обсуждение исходный текст
Ответ на Function does not see relations within schema it belongs to?  ("Alexander M. Pravking" <fduch@antar.bryansk.ru>)
Список pgsql-bugs
On Sat, Jul 24, 2004 at 01:56:02AM +0400, Alexander M. Pravking wrote:
> But the following works:
>
> fduch@~=# SET search_path TO test_schema;
> SET
> fduch@~=# INSERT INTO test_table DEFAULT VALUES ;
> INSERT 0 1
> fduch@~=# SET search_path TO public;
> SET
> fduch@~=# INSERT INTO test_schema.test_table DEFAULT VALUES ;
> INSERT 0 1
>
> AFAIK plPgSQL function, have been compiled once, caches query plans so
> it directly refers tables (by oids or something else).
> Is that the reason for the last insert to work?

Ha! That works only if the second insert is done with the same backend
as the first. So I suspect it's just a backend cache...


--
Fduch M. Pravking

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Alexander M. Pravking"
Дата:
Сообщение: Function does not see relations within schema it belongs to?
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: ecpg -D SYMBOL