Re: Use of search path in plpgsql functions, PG 8.3.12 - Mailing list pgsql-general

From Tom Lane
Subject Re: Use of search path in plpgsql functions, PG 8.3.12
Date
Msg-id 12963.1290700455@sss.pgh.pa.us
Whole thread Raw
In response to Use of search path in plpgsql functions, PG 8.3.12  (Troy Rasiah <troyr@vicnet.net.au>)
List pgsql-general
Troy Rasiah <troyr@vicnet.net.au> writes:
> If i set the search path to schema1,public the function still returns
> rows from the events table in the public schema.

What's probably happening is that plpgsql caches the execution plan for
the SELECT during the first execution of the function in any given
session.  The only really reliable way around that is to use EXECUTE
instead of an in-line statement.

            regards, tom lane

pgsql-general by date:

Previous
From: Matthew Walden
Date:
Subject: Re: Postgres 9.01 and WAL files issue
Next
From: "Kevin & Jessica Hermansen"
Date:
Subject: Dear Friends: a 123h