Re: Set search_path + server-prepared statements = cached plan must not change result type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Set search_path + server-prepared statements = cached plan must not change result type
Дата
Msg-id 15792.1453744617@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Set search_path + server-prepared statements = cached plan must not change result type  (Andres Freund <andres@anarazel.de>)
Ответы Re: Set search_path + server-prepared statements = cached plan must not change result type  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2016-01-25 12:39:29 -0500, Robert Haas wrote:
>> What is the ideal behavior, in your view?

> FWIW, I think that for a lot of practical cases the previous behaviour,
> where a prepared statement was defined in the context of the search path
> set during the PREPARE, made a lot more sense.

That argument is defensible probably for explicit PREPARE, but not at all
so for preparing done behind the scenes, as plpgsql does it, or as jdbc
does it.  The previous behavior amounted to silent inconsistency for
plpgsql users; statements that weren't obviously different might be
executed with the current search_path or with some previous setting.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: 2016-01 Commitfest
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: 2016-01 Commitfest