git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fefe703)
Suppress testing the options of CREATE TEXT SEARCH DICTIONARY during
2007年8月22日 22:30:20 +0000 (22:30 +0000)
2007年8月22日 22:30:20 +0000 (22:30 +0000)
initdb. We should create all the standard dictionaries even though
some of them may not work in template1's encoding. Per Teodor.


diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c
index a9a31504aa0f284dfab081c6558529a0b4f317cb..ca3b2ec2cef424638b81946187832b463ea6d03a 100644 (file)
--- a/src/backend/commands/tsearchcmds.c
+++ b/src/backend/commands/tsearchcmds.c
@@ -9,7 +9,7 @@
*
*
* 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)
Form_pg_ts_template tform;
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,
ObjectIdGetDatum(tmplId),
0, 0, 0);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /