PostgreSQL Source Code
git master
|
#include "utils/guc.h"
Go to the source code of this file.
Data Structures | |
struct | pg_locale_struct |
Typedefs | |
typedef struct pg_locale_struct * | pg_locale_t |
Functions | |
bool | check_locale_messages (char **newval, void **extra, GucSource source) |
void | assign_locale_messages (const char *newval, void *extra) |
bool | check_locale_monetary (char **newval, void **extra, GucSource source) |
void | assign_locale_monetary (const char *newval, void *extra) |
bool | check_locale_numeric (char **newval, void **extra, GucSource source) |
void | assign_locale_numeric (const char *newval, void *extra) |
bool | check_locale_time (char **newval, void **extra, GucSource source) |
void | assign_locale_time (const char *newval, void *extra) |
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) |
pg_locale_t | pg_newlocale_from_collation (Oid collid) |
char * | get_collation_version_for_oid (Oid collid, bool missing_ok) |
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 | |
char * | locale_messages |
char * | locale_monetary |
char * | locale_numeric |
char * | locale_time |
char * | localized_abbrev_days [] |
char * | localized_full_days [] |
char * | localized_abbrev_months [] |
char * | localized_full_months [] |
typedef struct pg_locale_struct* pg_locale_t |
Definition at line 102 of file pg_locale.h.
void assign_locale_messages | ( | const char * | newval, |
void * | extra | ||
) |
Definition at line 363 of file pg_locale.c.
References pg_perm_setlocale().
void assign_locale_monetary | ( | const char * | newval, |
void * | extra | ||
) |
void assign_locale_numeric | ( | const char * | newval, |
void * | extra | ||
) |
void assign_locale_time | ( | const char * | newval, |
void * | extra | ||
) |
void cache_locale_time | ( | void | ) |
Definition at line 752 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_mbstrlen(), PG_SQL_ASCII, pg_strcasecmp(), PG_UTF8, pstrdup(), setlocale, tm, and wchar2char().
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 2043 of file pg_locale.c.
References Assert, elog, ereport, errcode(), errhint(), errmsg(), ERROR, GetDatabaseEncoding(), pg_locale_struct::info, locale_t, mbstowcs_l, pfree(), PG_UTF8, pg_verifymbstr(), pnstrdup(), pg_locale_struct::provider, and generate_unaccent_rules::str.
Referenced by lowerstr_with_len(), str_initcap(), str_tolower(), str_toupper(), t_isalpha(), t_isdigit(), t_isprint(), t_isspace(), and TParserInit().
bool check_locale | ( | int | category, |
const char * | locale, | ||
char ** | canonname | ||
) |
Definition at line 251 of file pg_locale.c.
References elog, pfree(), pstrdup(), setlocale, and WARNING.
Referenced by check_locale_messages(), check_locale_monetary(), check_locale_numeric(), check_locale_time(), and createdb().
Definition at line 340 of file pg_locale.c.
References check_locale(), and PGC_S_DEFAULT.
Definition at line 294 of file pg_locale.c.
References check_locale().
Definition at line 306 of file pg_locale.c.
References check_locale().
Definition at line 318 of file pg_locale.c.
References check_locale().
void check_strxfrm_bug | ( | void | ) |
Definition at line 1192 of file pg_locale.c.
References buf, ereport, errcode(), errhint(), errmsg_internal(), ERROR, and setlocale.
Referenced by CheckMyDatabase(), and main().
Definition at line 1707 of file pg_locale.c.
References asc_tolower(), COLLOID, DATABASEOID, elog, ereport, errcode(), errmsg(), ERROR, get_collation_actual_version(), get_encoding_name_for_icu(), GetDatabaseEncoding(), GETSTRUCT, HeapTupleIsValid, MyDatabaseId, name, NameStr, ObjectIdGetDatum, palloc(), pg_attribute_unused(), pg_encoding_to_char(), ReleaseSysCache(), SearchSysCache1(), status(), generate_unaccent_rules::str, and value.
Referenced by do_collation_version_check(), do_collation_version_update(), pg_collation_actual_version(), and recordMultipleDependencies().
Definition at line 1326 of file pg_locale.c.
References elog, ERROR, lookup_collation_cache(), OidIsValid, 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 1376 of file pg_locale.c.
References elog, ereport, errcode(), errdetail(), errmsg(), ERROR, lookup_collation_cache(), OidIsValid, and setlocale.
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_isalpha(), t_isdigit(), t_isprint(), t_isspace(), and TParserInit().
pg_locale_t pg_newlocale_from_collation | ( | Oid | collid | ) |
Definition at line 1473 of file pg_locale.c.
References Assert, COLLOID, pg_locale_struct::deterministic, elog, ereport, errcode(), errhint(), errmsg(), ERROR, GETSTRUCT, HeapTupleIsValid, pg_locale_struct::info, collation_cache_entry::locale, locale_t, lookup_collation_cache(), MemoryContextAlloc(), MemoryContextStrdup(), NameStr, ObjectIdGetDatum, OidIsValid, pg_attribute_unused(), pg_locale_struct::provider, ReleaseSysCache(), SearchSysCache1(), status(), and TopMemoryContext.
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 148 of file pg_locale.c.
References DEBUG3, elog, FATAL, GetDatabaseEncoding(), NAMEDATALEN, setenv, setlocale, SetMessageEncoding(), and strlcpy().
Referenced by assign_locale_messages(), CheckMyDatabase(), and init_locale().
struct lconv* PGLC_localeconv | ( | void | ) |
Definition at line 470 of file pg_locale.c.
References CurrentLocaleConvValid, db_encoding_convert(), elog, encoding, ereport, errcode(), errmsg(), ERROR, FATAL, format, free_struct_lconv(), lengthof, locale_monetary, locale_numeric, MAX_L10N_DATA, pfree(), PG_CATCH, PG_END_TRY, pg_get_encoding_from_locale(), PG_RE_THROW, PG_SQL_ASCII, PG_TRY, pstrdup(), setlocale, struct_lconv_is_valid(), and tm.
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 1972 of file pg_locale.c.
References Assert, elog, ERROR, GetDatabaseEncoding(), pg_locale_struct::info, locale_t, PG_UTF8, pg_locale_struct::provider, and wcstombs_l.
Referenced by cache_locale_time(), lowerstr_with_len(), str_initcap(), str_tolower(), and str_toupper().
char* locale_messages |
Definition at line 87 of file pg_locale.c.
char* locale_monetary |
Definition at line 88 of file pg_locale.c.
Referenced by PGLC_localeconv().
char* locale_numeric |
Definition at line 89 of file pg_locale.c.
Referenced by PGLC_localeconv().
char* locale_time |
Definition at line 90 of file pg_locale.c.
Referenced by cache_locale_time().
char* localized_abbrev_days[] |
Definition at line 99 of file pg_locale.c.
Referenced by cache_locale_time(), DCH_from_char(), and DCH_to_char().
char* localized_abbrev_months[] |
Definition at line 101 of file pg_locale.c.
Referenced by cache_locale_time(), DCH_from_char(), and DCH_to_char().
char* localized_full_days[] |
Definition at line 100 of file pg_locale.c.
Referenced by cache_locale_time(), DCH_from_char(), and DCH_to_char().
char* localized_full_months[] |
Definition at line 102 of file pg_locale.c.
Referenced by cache_locale_time(), DCH_from_char(), and DCH_to_char().