diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-22 22:30:20 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-22 22:30:20 +0000 |
commit | 11fee4e3b593860cfd1c5af1d8ee770dc35c6b6b (patch) | |
tree | 99c6859c9fe7fa89273c06b7cdf0778dd31b8e89 /src | |
parent | fefe7034e2e077ec9f4b21edd8d51e29daecb47e (diff) | |
download | postgresql-11fee4e3b593860cfd1c5af1d8ee770dc35c6b6b.tar.gz postgresql-11fee4e3b593860cfd1c5af1d8ee770dc35c6b6b.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/commands/tsearchcmds.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c index a9a31504aa0..ca3b2ec2cef 100644 --- 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); |