PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | pg_locale_struct |
Macros | |
#define | LOCALE_NAME_BUFLEN 128 |
Typedefs | |
typedef struct pg_locale_struct * | pg_locale_t |
Functions | |
bool | check_locale (int category, const char *locale, char **canonname) |
char * | pg_perm_setlocale (int category, const char *locale) |
void | check_strxfrm_bug (void) |
bool | lc_collate_is_c (Oid collation) |
bool | lc_ctype_is_c (Oid collation) |
struct lconv * | PGLC_localeconv (void) |
void | cache_locale_time (void) |
void | make_icu_collator (const char *iculocstr, struct pg_locale_struct *resultp) |
pg_locale_t | pg_newlocale_from_collation (Oid collid) |
char * | get_collation_actual_version (char collprovider, const char *collcollate) |
void | check_icu_locale (const char *icu_locale) |
size_t | wchar2char (char *to, const wchar_t *from, size_t tolen, pg_locale_t locale) |
size_t | char2wchar (wchar_t *to, size_t tolen, const char *from, size_t fromlen, pg_locale_t locale) |
Variables | |
PGDLLIMPORT char * | locale_messages |
PGDLLIMPORT char * | locale_monetary |
PGDLLIMPORT char * | locale_numeric |
PGDLLIMPORT char * | locale_time |
PGDLLIMPORT char * | localized_abbrev_days [] |
PGDLLIMPORT char * | localized_full_days [] |
PGDLLIMPORT char * | localized_abbrev_months [] |
PGDLLIMPORT char * | localized_full_months [] |
PGDLLIMPORT struct pg_locale_struct | default_locale |
#define LOCALE_NAME_BUFLEN 128 |
Definition at line 36 of file pg_locale.h.
typedef struct pg_locale_struct* pg_locale_t |
Definition at line 93 of file pg_locale.h.
void cache_locale_time | ( | void | ) |
Definition at line 738 of file pg_locale.c.
References buf, cache_single_string(), CurrentLCTimeValid, DEBUG3, elog(), encoding, ERROR, FATAL, i, locale_time, localized_abbrev_days, localized_abbrev_months, localized_full_days, localized_full_months, MAX_L10N_DATA, pfree(), pg_get_encoding_from_locale(), PG_SQL_ASCII, PG_UTF8, pstrdup(), setlocale, and tm.
Referenced by DCH_from_char(), and DCH_to_char().
size_t char2wchar | ( | wchar_t * | to, |
size_t | tolen, | ||
const char * | from, | ||
size_t | fromlen, | ||
pg_locale_t | locale | ||
) |
Definition at line 2061 of file pg_locale.c.
References Assert(), elog(), ereport, errcode(), errhint(), errmsg(), ERROR, GetDatabaseEncoding(), locale, locale_t, mbstowcs_l, pfree(), PG_UTF8, pg_verifymbstr(), pnstrdup(), and generate_unaccent_rules::str.
Referenced by lowerstr_with_len(), str_initcap(), str_tolower(), str_toupper(), t_isalnum(), t_isalpha(), t_isdigit(), t_isprint(), t_isspace(), and TParserInit().
void check_icu_locale | ( | const char * | icu_locale | ) |
Definition at line 1954 of file pg_locale.c.
References ereport, errcode(), errmsg(), ERROR, icu_locale, and status().
Referenced by createdb().
bool check_locale | ( | int | category, |
const char * | locale, | ||
char ** | canonname | ||
) |
Definition at line 247 of file pg_locale.c.
References elog(), locale, pfree(), pstrdup(), res, setlocale, and WARNING.
Referenced by check_locale_messages(), check_locale_monetary(), check_locale_numeric(), check_locale_time(), and createdb().
void check_strxfrm_bug | ( | void | ) |
Definition at line 1150 of file pg_locale.c.
References buf, ereport, errcode(), errhint(), errmsg_internal(), ERROR, and setlocale.
Referenced by CheckMyDatabase(), and main().
char* get_collation_actual_version | ( | char | collprovider, |
const char * | collcollate | ||
) |
Definition at line 1647 of file pg_locale.c.
References buf, ereport, errmsg(), ERROR, locale_t, pg_strcasecmp(), pg_strncasecmp(), psprintf(), pstrdup(), and status().
Referenced by AlterCollation(), AlterDatabaseRefreshColl(), CheckMyDatabase(), createdb(), DefineCollation(), pg_collation_actual_version(), pg_database_collation_actual_version(), pg_import_system_collations(), and pg_newlocale_from_collation().
Definition at line 1299 of file pg_locale.c.
References default_locale, elog(), ERROR, lookup_collation_cache(), OidIsValid, pg_locale_struct::provider, and setlocale.
Referenced by bpchareq(), bpcharne(), btvarstrequalimage(), convert_string_datum(), DefineCollation(), hashbpchar(), hashbpcharextended(), hashtext(), hashtextextended(), make_greater_string(), match_pattern_prefix(), spg_text_inner_consistent(), text_position_setup(), text_starts_with(), texteq(), textne(), varstr_cmp(), and varstr_sortsupport().
Definition at line 1352 of file pg_locale.c.
Referenced by DefineCollation(), Generic_Text_IC_like(), GenericMatchText(), like_fixed_prefix(), lowerstr_with_len(), pg_set_regex_collation(), str_initcap(), str_tolower(), str_toupper(), t_isalnum(), t_isalpha(), t_isdigit(), t_isprint(), t_isspace(), and TParserInit().
void make_icu_collator | ( | const char * | iculocstr, |
struct pg_locale_struct * | resultp | ||
) |
Definition at line 1404 of file pg_locale.c.
References ereport, errcode(), errmsg(), ERROR, pg_locale_struct::info, MemoryContextStrdup(), status(), and TopMemoryContext.
Referenced by CheckMyDatabase(), and pg_newlocale_from_collation().
pg_locale_t pg_newlocale_from_collation | ( | Oid | collid | ) |
Definition at line 1481 of file pg_locale.c.
References Assert(), collid, COLLOID, default_locale, pg_locale_struct::deterministic, elog(), ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, get_collation_actual_version(), get_namespace_name(), GETSTRUCT, HeapTupleIsValid, pg_locale_struct::info, collation_cache_entry::locale, locale_t, lookup_collation_cache(), make_icu_collator(), MemoryContextAlloc(), NameStr, ObjectIdGetDatum(), OidIsValid, pg_attribute_unused, pg_locale_struct::provider, quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), SysCacheGetAttr(), TextDatumGetCString, TopMemoryContext, and WARNING.
Referenced by bpchareq(), bpcharne(), DefineCollation(), Generic_Text_IC_like(), GenericMatchText(), hashbpchar(), hashbpcharextended(), hashtext(), hashtextextended(), like_fixed_prefix(), pg_set_regex_collation(), str_initcap(), str_tolower(), str_toupper(), text_position_setup(), text_starts_with(), texteq(), textne(), varstr_cmp(), and varstr_sortsupport().
char* pg_perm_setlocale | ( | int | category, |
const char * | locale | ||
) |
Definition at line 144 of file pg_locale.c.
References DEBUG3, elog(), FATAL, GetDatabaseEncoding(), locale, LOCALE_NAME_BUFLEN, setenv, setlocale, SetMessageEncoding(), and strlcpy().
Referenced by assign_locale_messages(), CheckMyDatabase(), and init_locale().
struct lconv* PGLC_localeconv | ( | void | ) |
Definition at line 456 of file pg_locale.c.
References CurrentLocaleConvValid, db_encoding_convert(), elog(), encoding, ereport, errcode(), errmsg(), ERROR, FATAL, free_struct_lconv(), locale_monetary, locale_numeric, pfree(), PG_CATCH, PG_END_TRY, pg_get_encoding_from_locale(), PG_RE_THROW, PG_SQL_ASCII, PG_TRY, pstrdup(), setlocale, and struct_lconv_is_valid().
Referenced by cash_in(), cash_numeric(), cash_out(), int4_cash(), int8_cash(), NUM_prepare_locale(), and numeric_cash().
size_t wchar2char | ( | char * | to, |
const wchar_t * | from, | ||
size_t | tolen, | ||
pg_locale_t | locale | ||
) |
Definition at line 1990 of file pg_locale.c.
References Assert(), elog(), ERROR, GetDatabaseEncoding(), locale, locale_t, PG_UTF8, and wcstombs_l.
Referenced by lowerstr_with_len(), str_initcap(), str_tolower(), and str_toupper().
|
extern |
Definition at line 1352 of file pg_locale.c.
Referenced by CheckMyDatabase(), lc_collate_is_c(), and pg_newlocale_from_collation().
|
extern |
Definition at line 86 of file pg_locale.c.
|
extern |
Definition at line 87 of file pg_locale.c.
Referenced by PGLC_localeconv().
|
extern |
Definition at line 88 of file pg_locale.c.
Referenced by PGLC_localeconv().
|
extern |
Definition at line 89 of file pg_locale.c.
Referenced by cache_locale_time().
|
extern |
Definition at line 98 of file pg_locale.c.
Referenced by cache_locale_time(), DCH_from_char(), and DCH_to_char().
|
extern |
Definition at line 100 of file pg_locale.c.
Referenced by cache_locale_time(), DCH_from_char(), and DCH_to_char().
|
extern |
Definition at line 99 of file pg_locale.c.
Referenced by cache_locale_time(), DCH_from_char(), and DCH_to_char().
|
extern |
Definition at line 101 of file pg_locale.c.
Referenced by cache_locale_time(), DCH_from_char(), and DCH_to_char().