From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: david.day@redcom.com
Cc: PostgreSQL General <pgsql-general@postgresql.org>
Subject: Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?
Date: Mon, 19 Nov 2018 17:36:51 -0500
Message-ID: <31926.1542667011@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHyXU0zzg_ErWNwzSkNLyzTz4hYP6fObFzMhtJVFDy_VFdzFbQ@mail.gmail.com>
References: <0fd14b7dff1741b988d4f907af745cc4@exch-02.redcom.com>
<15705.1542650179@sss.pgh.pa.us>
<CAHyXU0zzg_ErWNwzSkNLyzTz4hYP6fObFzMhtJVFDy_VFdzFbQ@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, mmoncure@gmail.com, david.day@redcom.com
Subject: Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?
In-Reply-To: <31926.1542667011@sss.pgh.pa.us>
References: <0fd14b7dff1741b988d4f907af745cc4@exch-02.redcom.com> <15705.1542650179@sss.pgh.pa.us> <CAHyXU0zzg_ErWNwzSkNLyzTz4hYP6fObFzMhtJVFDy_VFdzFbQ@mail.gmail.com> <31926.1542667011@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox