Re: Bug? Prepared queries continue to use search_path from their preparation time
| От | Toby Corkindale |
|---|---|
| Тема | Re: Bug? Prepared queries continue to use search_path from their preparation time |
| Дата | |
| Msg-id | 4FFF7E0E.2010308@strategicdata.com.au обсуждение исходный текст |
| Ответ на | Re: Bug? Prepared queries continue to use search_path from their preparation time ("Greg Sabino Mullane" <greg@turnstep.com>) |
| Список | 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 по дате отправления: