Re: Bug? Prepared queries continue to use search_path from their preparation time - Mailing list pgsql-general

From Toby Corkindale
Subject Re: Bug? Prepared queries continue to use search_path from their preparation time
Date
Msg-id 4FFF7E0E.2010308@strategicdata.com.au
Whole thread Raw
In response to Re: Bug? Prepared queries continue to use search_path from their preparation time  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-general
On 13/07/12 02:59, Greg Sabino Mullane wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
>>> This behavior is intentional.
>
>> In that case, the error lies with the Perl libraries that automatically
>> prepare and cache queries, but do not include the search_path in the
>> cache keys.
>
> You have lost me there. Which Perl libraries are those?

I was thinking of DBIx::Class, which will automatically use the DBI
function prepare_cached() for all the queries it generates.

However I discovered this warning hidden deep in the documentation:

"[..] once your schema is instantiated, you should not change the
PostgreSQL schema search path for that schema's database connection. If
you do, Bad Things may happen."

So they are aware of the problem, but unfortunately I hadn't seen that
warning (and I suspect most users won't) until after they've encountered
the problem.

I guess for now I chalk this up to experience and remember not to do it
again! :)

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PostgreSQL index issue
Next
From: raghu ram
Date:
Subject: Re: ERROR: out of shared memory - But the table is empty