Re: pg_upgrade fails saying function unaccent(text) doesn't exist
Adrian Klaver <adrian.klaver@aklaver.com>
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Gunnlaugur Thor Briem <gunnlaugur@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>, pgsql-general@lists.postgresql.org
Date: 2018-08-31T14:14:18Z
Lists: pgsql-hackers, pgsql-general
On 08/30/2018 09:03 AM, Gunnlaugur Thor Briem wrote:
> \dFd unaccent
> List of text search dictionaries
> Schema | Name | Description
> --------+----------+-------------
> public | unaccent |
> (1 row)
>
> \dFd+ unaccent
> List of text search dictionaries
> Schema | Name | Template | Init options | Description
> --------+----------+-----------------+--------------------+-------------
> public | unaccent | public.unaccent | rules = 'unaccent' |
> (1 row)
>
> Cheers,
> Gulli
>
I could not replicate with simple case:
select version();
version
------------------------------------------------------------------------------------
PostgreSQL 10.5 on x86_64-pc-linux-gnu, compiled by gcc (SUSE Linux)
4.8.5, 64-bit
CREATE OR REPLACE FUNCTION public.semantic_normalize(title text)
RETURNS text
LANGUAGE sql
AS $function$
SELECT lower(unaccent(btrim(regexp_replace($1,
'\s+', ' ', 'g'), ' "')))
$function$
CREATE TABLE unaccent_test(title text);
INSERT INTO unaccent_test values ('Hukić'), ('Böttcher'), ('ÀÁÂÃÄÅ'),
('électro');
CREATE INDEX ix_semantic_normalize_title on unaccent_test(title);
VACUUM ANALYZE unaccent_test;
VACUUM
vacuumdb -U postgres -z -t unaccent_test test
vacuumdb: vacuuming database "test"
The only thing I can think of is that you have an older version of
vacuumdb that is not aware of the schema specification changes in the
newer versions of Postgrse.
--
Adrian Klaver
adrian.klaver@aklaver.com
Commits
-
Make contrib/unaccent's unaccent() function work when not in search path.
- d4ab3962613f 9.4.20 landed
- c79b39fb1c5b 9.5.15 landed
- a54f5b187a4a 10.6 landed
- a5322ca10fa1 12.0 landed
- 594ee1ada5bc 9.6.11 landed
- 25ff97ba77cb 9.3.25 landed
- 23aad181f447 11.0 landed
-
Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers.
- fb8697b31aae 11.0 cited