From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: adam.bartoszewicz@gmail.com
Subject: BUG #15181: pg_dump - missing schema in CREATE TEXT SEARCH DICTIONARY
Date: Mon, 30 Apr 2018 15:02:50 +0000
Message-ID: <152510057034.19803.9209003918751664295@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15181
Logged by: Adam Bartoszewicz
Email address: adam.bartoszewicz@gmail.com
PostgreSQL version: 9.3.22
Operating system: CentOS 6
Description:
Helo,
I use PostgreSQL v 9.3.22 (enterprisedb.com installer), CentOS 6
I created custom text search dictionary following instructions found in
https://github.com/nediam/tsearch-polish/blob/wiki/PolskiSlownikTsearchPostgreSQL.md.
It is in Polish but has two simple steps:
1. Unpack
http://tsearch-polish.googlecode.com/files/tsearch_data_polish_20120730.zip
and copy to share/tsearch_data/ folder
2. Run commands
CREATE TEXT SEARCH CONFIGURATION public.polish ( COPY = pg_catalog.english
);
CREATE TEXT SEARCH DICTIONARY polish_ispell (
TEMPLATE = ispell,
DictFile = polish, -- tsearch_data/polish.dict
AffFile = polish, -- tsearch_data/polish.affix
StopWords = polish -- tsearch_data/polish.stop
);
CREATE TEXT SEARCH DICTIONARY polish_synonym (
TEMPLATE = synonym,
SYNONYMS = polish -- tsearch_data/polish.syn
);
CREATE TEXT SEARCH DICTIONARY polish_thesaurus (
TEMPLATE = thesaurus,
DictFile = polish, -- tsearch_data/polish.ths
Dictionary = polish_ispell
);
ALTER TEXT SEARCH CONFIGURATION polish
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword,
hword_part
WITH polish_thesaurus, polish_synonym, polish_ispell, simple;
The bug ocurs when I try to dump and reload database structure.
pg_dump creates command with missing schema:
CREATE TEXT SEARCH DICTIONARY public.polish_thesaurus (
TEMPLATE = pg_catalog.thesaurus,
dictfile = 'polish', dictionary = 'polish_ispell' );
dictionary = 'polish_ispell'
instead of
dictionary = 'public.polish_ispell'
psql -f pg_dump_file raises error:
ERROR: text search dictionary "polish_ispell" does not exist
There is of course simple workaround: manually correct file created by
pg_dump.
Adam
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: noreply@postgresql.org, adam.bartoszewicz@gmail.com
Subject: Re: BUG #15181: pg_dump - missing schema in CREATE TEXT SEARCH DICTIONARY
In-Reply-To: <152510057034.19803.9209003918751664295@wrigleys.postgresql.org>
References: <152510057034.19803.9209003918751664295@wrigleys.postgresql.org>
* 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