From: Bruce Momjian <bruce@momjian.us>
To: Gunnlaugur Thor Briem <gunnlaugur@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_upgrade fails saying function unaccent(text) doesn't exist
Date: Wed, 29 Aug 2018 15:06:35 -0400
Message-ID: <20180829190635.GD25450@momjian.us> (raw)
In-Reply-To: <CAPs+M8LCex6d=DeneofdsoJVijaG59m9V0ggbb3pOH7hZO4+cQ@mail.gmail.com>
References: <CAPs+M8LCex6d=DeneofdsoJVijaG59m9V0ggbb3pOH7hZO4+cQ@mail.gmail.com>
On Wed, Aug 29, 2018 at 06:09:53PM +0000, Gunnlaugur Thor Briem wrote:
> Hi,
>
> I'm trying to upgrade an old PG 9.4 cluster to PG 10, and it's failing on
> creating an index that uses the unaccent(text) function.
>
> That function is part of the unaccent extension, which is installed in the old
> DB cluster. I expect pg_upgrade to create that extension as part of the
> upgrade. It does create other extensions that are installed in the old DB
> cluster. I don't get why this one isn't included.
This is caused by security changes made in PG 10.3 and other minor
releases. Please see this thread for an outline of the issue:
https://www.postgresql.org/message-id/flat/152106914669.1223.5104148605998271987%40wrigleys.postgres...
I think you have to change your index function to specify the schema
name before the unacces function call, e.g.
SELECT lower(public.unaccent(btrim(regexp_replace(
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
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: bruce@momjian.us, gunnlaugur@gmail.com
Subject: Re: pg_upgrade fails saying function unaccent(text) doesn't exist
In-Reply-To: <20180829190635.GD25450@momjian.us>
References: <CAPs+M8LCex6d=DeneofdsoJVijaG59m9V0ggbb3pOH7hZO4+cQ@mail.gmail.com> <20180829190635.GD25450@momjian.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