Commit 11fee4e3 authored by Tom Lane's avatar Tom Lane

Suppress testing the options of CREATE TEXT SEARCH DICTIONARY during

initdb.  We should create all the standard dictionaries even though
some of them may not work in template1's encoding.  Per Teodor.
parent fefe7034
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tsearchcmds.c,v 1.4 2007/08/22 05:13:50 tgl Exp $ * $PostgreSQL: pgsql/src/backend/commands/tsearchcmds.c,v 1.5 2007/08/22 22:30:20 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -418,6 +418,17 @@ verify_dictoptions(Oid tmplId, List *dictoptions) ...@@ -418,6 +418,17 @@ verify_dictoptions(Oid tmplId, List *dictoptions)
Form_pg_ts_template tform; Form_pg_ts_template tform;
Oid initmethod; Oid initmethod;
/*
* Suppress this test when running in a standalone backend. This is a
* hack to allow initdb to create prefab dictionaries that might not
* actually be usable in template1's encoding (due to using external
* files that can't be translated into template1's encoding). We want
* to create them anyway, since they might be usable later in other
* databases.
*/
if (!IsUnderPostmaster)
return;
tup = SearchSysCache(TSTEMPLATEOID, tup = SearchSysCache(TSTEMPLATEOID,
ObjectIdGetDatum(tmplId), ObjectIdGetDatum(tmplId),
0, 0, 0); 0, 0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment