Re: wrong search_path being used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rodrigo Rosenfeld Rosas <rr(dot)rosas(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: wrong search_path being used
Date: 2013-01-07 19:17:27
Message-ID: 14893.1357586247@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Rodrigo Rosenfeld Rosas <rr(dot)rosas(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rodrigo Rosenfeld Rosas 2013-01-07 19:26:24 Re: wrong search_path being used
Previous Message Rodrigo Rosenfeld Rosas 2013-01-07 18:50:17 wrong search_path being used