Thanks. If I had only read the manual before posting. I solved it by
using 'execute' instead of 'select into' since the search_path is not
static in my system.
Gene
On Saturday, September 6, 2003, at 04:21 PM, Bruce Momjian wrote:
I think the problem is that the first time the function is c
Gaetano Mendola wrote:
> "Bruce Momjian" <[EMAIL PROTECTED]> wrote:
> > Tom Lane wrote:
> > > Bruce Momjian <[EMAIL PROTECTED]> writes:
> > > > This highlights another problem with our plpgsql function caching.
> > >
> > > It's a little disturbing to think that any change in SEARCH_PATH might
> > >
"Bruce Momjian" <[EMAIL PROTECTED]> wrote:
> Tom Lane wrote:
> > Bruce Momjian <[EMAIL PROTECTED]> writes:
> > > This highlights another problem with our plpgsql function caching.
> >
> > It's a little disturbing to think that any change in SEARCH_PATH might
> > force us to discard all cached plans
Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > This highlights another problem with our plpgsql function caching.
>
> It's a little disturbing to think that any change in SEARCH_PATH might
> force us to discard all cached plans. That could be expensive; and
> consider a function
Eugene Chow wrote:
> Thanks. If I had only read the manual before posting. I solved it by
> using 'execute' instead of 'select into' since the search_path is not
> static in my system.
Yep, that's the workaround mentioned in the FAQ.
--
Bruce Momjian| http://candle
Bruce Momjian <[EMAIL PROTECTED]> writes:
> This highlights another problem with our plpgsql function caching.
It's a little disturbing to think that any change in SEARCH_PATH might
force us to discard all cached plans. That could be expensive; and
consider a function that deliberately sets SEARC
I think the problem is that the first time the function is called, it is
compiled and cached for later use. At that time the function is bound
to the table oid, so even though you change the search path, the cached
copy still calls the old table.
If you exit psql and re-enter, or change the sche
My plpgsql function seems to be ignoring search_path when looking for
the right table to select from. I'm running 7.3.4. Below is my test
code. Am I doing something wrong?
TIA, Gene Chow
test=> create or replace function getval() returns varchar as '
test'> declare val varchar;
test'> begin
tes