Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _PG_LOCALE_
00013 #define _PG_LOCALE_
00014
00015 #include <locale.h>
00016 #ifdef LOCALE_T_IN_XLOCALE
00017 #include <xlocale.h>
00018 #endif
00019
00020 #include "utils/guc.h"
00021
00022
00023
00024 extern char *locale_messages;
00025 extern char *locale_monetary;
00026 extern char *locale_numeric;
00027 extern char *locale_time;
00028
00029
00030 extern char *localized_abbrev_days[];
00031 extern char *localized_full_days[];
00032 extern char *localized_abbrev_months[];
00033 extern char *localized_full_months[];
00034
00035
00036 extern bool check_locale_messages(char **newval, void **extra, GucSource source);
00037 extern void assign_locale_messages(const char *newval, void *extra);
00038 extern bool check_locale_monetary(char **newval, void **extra, GucSource source);
00039 extern void assign_locale_monetary(const char *newval, void *extra);
00040 extern bool check_locale_numeric(char **newval, void **extra, GucSource source);
00041 extern void assign_locale_numeric(const char *newval, void *extra);
00042 extern bool check_locale_time(char **newval, void **extra, GucSource source);
00043 extern void assign_locale_time(const char *newval, void *extra);
00044
00045 extern bool check_locale(int category, const char *locale, char **canonname);
00046 extern char *pg_perm_setlocale(int category, const char *locale);
00047
00048 extern bool lc_collate_is_c(Oid collation);
00049 extern bool lc_ctype_is_c(Oid collation);
00050
00051
00052
00053
00054
00055 extern struct lconv *PGLC_localeconv(void);
00056
00057 extern void cache_locale_time(void);
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 #ifdef HAVE_LOCALE_T
00068 typedef locale_t pg_locale_t;
00069 #else
00070 typedef int pg_locale_t;
00071 #endif
00072
00073 extern pg_locale_t pg_newlocale_from_collation(Oid collid);
00074
00075
00076 #ifdef USE_WIDE_UPPER_LOWER
00077 extern size_t wchar2char(char *to, const wchar_t *from, size_t tolen,
00078 pg_locale_t locale);
00079 extern size_t char2wchar(wchar_t *to, size_t tolen,
00080 const char *from, size_t fromlen, pg_locale_t locale);
00081 #endif
00082
00083 #endif