Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
[PostgreSQL.git] / src / include / utils / pg_locale.h
blob2b60027a98c86bc6498dd8d9b96f20a23119a5d9
1 /*-----------------------------------------------------------------------
3 * PostgreSQL locale utilities
5 * $PostgreSQL$
7 * Copyright (c) 2002-2008, PostgreSQL Global Development Group
9 *-----------------------------------------------------------------------
12 #ifndef _PG_LOCALE_
13 #define _PG_LOCALE_
15 #include <locale.h>
17 #include "utils/guc.h"
20 /* GUC settings */
21 extern char *locale_messages;
22 extern char *locale_monetary;
23 extern char *locale_numeric;
24 extern char *locale_time;
26 /* lc_time localization cache */
27 extern char *localized_abbrev_days[];
28 extern char *localized_full_days[];
29 extern char *localized_abbrev_months[];
30 extern char *localized_full_months[];
33 extern const char *locale_messages_assign(const char *value,
34 bool doit, GucSource source);
35 extern const char *locale_monetary_assign(const char *value,
36 bool doit, GucSource source);
37 extern const char *locale_numeric_assign(const char *value,
38 bool doit, GucSource source);
39 extern const char *locale_time_assign(const char *value,
40 bool doit, GucSource source);
42 extern bool check_locale(int category, const char *locale);
43 extern char *pg_perm_setlocale(int category, const char *locale);
45 extern bool lc_collate_is_c(void);
46 extern bool lc_ctype_is_c(void);
49 * Return the POSIX lconv struct (contains number/money formatting
50 * information) with locale information for all categories.
52 extern struct lconv *PGLC_localeconv(void);
54 extern void cache_locale_time(void);
56 #endif /* _PG_LOCALE_ */