From: Tom Lane <tgl@sss.pgh.pa.us>
To: mr.kovalchuk.andrey@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15382: Error create dictionary in pg_dump
Date: Thu, 13 Sep 2018 13:30:04 -0400
Message-ID: <11550.1536859804@sss.pgh.pa.us> (raw)
In-Reply-To: <153681016068.22333.14472119446449542505@wrigleys.postgresql.org>
References: <153681016068.22333.14472119446449542505@wrigleys.postgresql.org>
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> Dump is creates, but have one trouble. Result of using pg_resote command:
> pg_restore: [архиватор (БД)] could not execute query: ОШИБКА (Error):
> словарь текстового поиска (text search dictionary) "ispell_apteka25" не
> существует (not exists)
> Выполнялась команда (running command): CREATE TEXT SEARCH DICTIONARY
> "public"."thesaurus_apteka25" (
> TEMPLATE = "pg_catalog"."thesaurus",
> dictfile = 'apteka25', dictionary = 'ispell_apteka25' );
Yeah, this is a consequence of the security changes we made awhile back
to run dump and restore under restrictive search_path settings. You need
to explicitly schema-qualify that sub-dictionary name, since it isn't in
the pg_catalog schema. Unfortunately, since dictionary parameters are
just strings without a lot of fixed semantics to them, pg_dump can't
really fix this for you --- it doesn't know that that parameter refers
to a database object, or which database object.
> If i change argument dictionary for this note to: dictionary =
> 'public.ispell_apteka25' - it's now ok!
Yup, that's what you have to do. Note that this is a good thing
anyway, independently of pg_dump, because your old definition could
have failed if the thesaurus dictionary were invoked by any
application running under a nondefault search_path.
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mr.kovalchuk.andrey@gmail.com
Subject: Re: BUG #15382: Error create dictionary in pg_dump
In-Reply-To: <11550.1536859804@sss.pgh.pa.us>
References: <153681016068.22333.14472119446449542505@wrigleys.postgresql.org> <11550.1536859804@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