Re: wrong search_path being used - Mailing list pgsql-bugs

From Tom Lane
Subject Re: wrong search_path being used
Date
Msg-id 14893.1357586247@sss.pgh.pa.us
Whole thread Raw
In response to wrong search_path being used  (Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>)
Responses Re: wrong search_path being used
Re: wrong search_path being used
List pgsql-bugs
Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> writes:
> perform pg_catalog.set_config('search_path', templ, true);

>      ...

> select count(distinct transaction_id) from public.transaction_condition
> into temp_count;

> raise notice '% remaining transactions in public!', temp_count;

> select count(distinct transaction_id) from transaction_condition into
> temp_count;

If this is inside a plpgsql function that's been executed more than
once, the SELECTs would have plans that were cached the first time
around, so that what would matter is the search_path that prevailed
during the first execution.  There have been discussions about changing
that but we wouldn't treat it as a back-patchable bug fix, because
it would almost certainly break things for somebody.

            regards, tom lane

pgsql-bugs by date:

Previous
From: jared
Date:
Subject: Re: BUG #7797: datetime + '1 month'::interval is going outside of a month's bounds
Next
From: Rodrigo Rosenfeld Rosas
Date:
Subject: Re: wrong search_path being used