Skip to content

Commit 11fee4e

Browse files
committed
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.
1 parent fefe703 commit 11fee4e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/backend/commands/tsearchcmds.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/commands/tsearchcmds.c,v 1.4 2007/08/22 05:13:50 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/commands/tsearchcmds.c,v 1.5 2007/08/22 22:30:20 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -418,6 +418,17 @@ verify_dictoptions(Oid tmplId, List *dictoptions)
418418
Form_pg_ts_template tform;
419419
Oid initmethod;
420420

421+
/*
422+
* Suppress this test when running in a standalone backend. This is a
423+
* hack to allow initdb to create prefab dictionaries that might not
424+
* actually be usable in template1's encoding (due to using external
425+
* files that can't be translated into template1's encoding). We want
426+
* to create them anyway, since they might be usable later in other
427+
* databases.
428+
*/
429+
if (!IsUnderPostmaster)
430+
return;
431+
421432
tup = SearchSysCache(TSTEMPLATEOID,
422433
ObjectIdGetDatum(tmplId),
423434
0, 0, 0);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy