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?

  • I'd say you haven't installed the contrib modules. They're often packaged separately. – Craig Ringer Dec 9 '14 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 Dec 9 '14 at 9:34
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 :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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