Re: Function does not see relations within schema it belongs to? - Mailing list pgsql-bugs

From Alexander M. Pravking
Subject Re: Function does not see relations within schema it belongs to?
Date
Msg-id 20040723220718.GE72022@dyatel.antar.bryansk.ru
Whole thread Raw
In response to Function does not see relations within schema it belongs to?  ("Alexander M. Pravking" <fduch@antar.bryansk.ru>)
List 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 by date:

Previous
From: "Alexander M. Pravking"
Date:
Subject: Function does not see relations within schema it belongs to?
Next
From: Michael Meskes
Date:
Subject: Re: ecpg -D SYMBOL