diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-28 15:25:44 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-28 15:25:44 +0000 |
commit | 834f45014bd944817e37cdde7169e4f9dbf87931 (patch) | |
tree | ee27cfb1725561db68c9499dd721dcbdeb705199 /src | |
parent | c0a8276061f57d85a5fe11dd13cefd1182c4bc80 (diff) | |
download | postgresql-834f45014bd944817e37cdde7169e4f9dbf87931.tar.gz postgresql-834f45014bd944817e37cdde7169e4f9dbf87931.zip |
Tweak initdb's text search configuration selection code so it can
cope with LANG settings like 'es_ES@euro'.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/initdb/initdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 134c703c468..52f50f195b7 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -42,7 +42,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * Portions taken from FreeBSD. * - * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.141 2007/09/25 16:29:34 petere Exp $ + * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.142 2007/09/28 15:25:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -971,7 +971,7 @@ find_matching_ts_config(const char *lc_type) *ptr; /* - * Convert lc_ctype to a language name by stripping ".utf8" or + * Convert lc_ctype to a language name by stripping ".utf8", "@euro", or * what-have-you */ if (lc_type == NULL) @@ -979,7 +979,7 @@ find_matching_ts_config(const char *lc_type) else { ptr = langname = xstrdup(lc_type); - while (*ptr && *ptr != '.') + while (*ptr && *ptr != '.' && *ptr != '@') ptr++; *ptr = '\0'; } |