|
4 | 4 | *
|
5 | 5 | * Portions Copyright (c) 2002-2010, PostgreSQL Global Development Group
|
6 | 6 | *
|
7 |
| - * $PostgreSQL: pgsql/src/backend/utils/adt/pg_locale.c,v 1.55 2010/04/24 22:54:56 momjian Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/backend/utils/adt/pg_locale.c,v 1.56 2010/04/26 14:17:52 momjian Exp $ |
8 | 8 | *
|
9 | 9 | *-----------------------------------------------------------------------
|
10 | 10 | */
|
@@ -627,7 +627,15 @@ cache_locale_time(void)
|
627 | 627 | save_lc_time=pstrdup(save_lc_time);
|
628 | 628 |
|
629 | 629 | #ifdefWIN32
|
630 |
| -/* See the WIN32 comment near the top of PGLC_localeconv() */ |
| 630 | +/* |
| 631 | + * On WIN32, there is no way to get locale-specific time values in a |
| 632 | + * specified locale, like we do for monetary/numeric. We can only get |
| 633 | + * CP_ACP (see strftime_win32) or UTF16. Therefore, we get UTF16 and |
| 634 | + * convert it to the database locale. However, wcsftime() internally |
| 635 | + * uses LC_CTYPE, so we set it here. See the WIN32 comment near the |
| 636 | + * top of PGLC_localeconv(). |
| 637 | + */ |
| 638 | + |
631 | 639 | /* save user's value of ctype locale */
|
632 | 640 | save_lc_ctype=setlocale(LC_CTYPE,NULL);
|
633 | 641 | if (save_lc_ctype)
|
|