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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: david(dot)day(at)redcom(dot)com, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?
Date: 2018-11-19 22:36:51
Message-ID: 31926.1542667011@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> On Mon, Nov 19, 2018 at 11:56 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2018-11-19 23:06:58 Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?
Previous Message Merlin Moncure 2018-11-19 20:34:32 Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?