3

I'm trying to move data between servers. I recreated the whole database structure, checked that same users exist and the unaccent extension that we use is enabled for all schemas of the target database.

When I try to run:

pg_restore -h %server_host% -a -c --disable-triggers -d %db_name% -U %user_name% 2014-12-09.custom

I get the following error:

pg_restore: [archiver (db)] COPY failed for table "contracts":
ERROR:  text search dictionary "unaccent" does not exist

What am I missing here?

2
  • I'd say you haven't installed the contrib modules. They're often packaged separately. Commented Dec 9, 2014 at 9:28
  • 1
    @CraigRinger postgresql-contrib-9.3 package is installed into the system and I can use unaccent, so unfortunately this is not the case.
    – jezzarax
    Commented Dec 9, 2014 at 9:34

1 Answer 1

2

It came out that there was a stupid hack, unaccent function was marked immutable and there was an index that used this unaccent function. Dropping the index and recreating it after backup did the trick.

Do not use hacks, folks :)

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.