Re: plpgsql and intarray extension; int[] - int[] operator does notexist ?

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: plpgsql and intarray extension; int[] - int[] operator does notexist ?
Дата
Msg-id CAHyXU0yAfNckidGXivQ0oZ5crEPg74auWLG7MeUM3-x99qD+qA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Nov 19, 2018 at 4:36 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Merlin Moncure <mmoncure@gmail.com> writes:
> > On Mon, Nov 19, 2018 at 11:56 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> The search_path in the trigger probably doesn't include public.
> >> You could add a "SET search_path = whatever" clause to the trigger
> >> function definition to ensure it runs with a predictable path.
>
> > Might be worth considering:
> > SET LOCAL search_path = whatever
> > So that LOCAL makes the change local to the transaction.
>
> What I was suggesting was to create the trigger function using
>
> create function ... as $$ ...body... $$ set search_path = whatever;
>
> That makes the setting local to each function call.

Oh, I see.  Yes, that's even better.

merlin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?
Следующее
От: Wyatt Alt
Дата:
Сообщение: replication lag despite corrective config