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

From: "Alexander M(dot) Pravking" <fduch(at)antar(dot)bryansk(dot)ru>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Function does not see relations within schema it belongs to?
Date: 2004-07-23 22:07:18
Message-ID: 20040723220718.GE72022@dyatel.antar.bryansk.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Jul 24, 2004 at 01:56:02AM +0400, Alexander M. Pravking wrote:
> But the following works:
>
> fduch(at)~=# SET search_path TO test_schema;
> SET
> fduch(at)~=# INSERT INTO test_table DEFAULT VALUES ;
> INSERT 0 1
> fduch(at)~=# SET search_path TO public;
> SET
> fduch(at)~=# 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Hans Schou 2004-07-24 20:40:00 INDEX_MAX_KEYS too small, need 36 parameters
Previous Message Alexander M. Pravking 2004-07-23 21:56:02 Function does not see relations within schema it belongs to?