Re: plpgsql and intarray extension; int[] - int[] operator does not exist ? - Mailing list pgsql-general

From Tom Lane
Subject Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?
Date
Msg-id 31926.1542667011@sss.pgh.pa.us
Whole thread Raw
In response to Re: plpgsql and intarray extension; int[] - int[] operator does notexist ?  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: plpgsql and intarray extension; int[] - int[] operator does notexist ?
List pgsql-general
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.

            regards, tom lane


pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: plpgsql and intarray extension; int[] - int[] operator does notexist ?
Next
From: Merlin Moncure
Date:
Subject: Re: plpgsql and intarray extension; int[] - int[] operator does notexist ?