PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/pg_collation.h"
#include "mb/pg_wchar.h"
#include "utils/formatting.h"
#include "utils/pg_locale.h"
Go to the source code of this file.
Macros | |
#define | TEXTBUFLEN 1024 |
Functions | |
locale_t | make_libc_collator (const char *collate, const char *ctype) |
int | strncoll_libc (const char *arg1, ssize_t len1, const char *arg2, ssize_t len2, pg_locale_t locale) |
size_t | strnxfrm_libc (char *dest, size_t destsize, const char *src, ssize_t srclen, pg_locale_t locale) |
static void | report_newlocale_failure (const char *localename) |
static size_t | mbstowcs_l (wchar_t *dest, const char *src, size_t n, locale_t loc) |
static size_t | wcstombs_l (char *dest, const wchar_t *src, size_t n, locale_t loc) |
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) |
#define TEXTBUFLEN 1024 |
Definition at line 25 of file pg_locale_libc.c.
size_t char2wchar | ( | wchar_t * | to, |
size_t | tolen, | ||
const char * | from, | ||
size_t | fromlen, | ||
pg_locale_t | locale | ||
) |
Definition at line 433 of file pg_locale_libc.c.
References Assert, ereport, errcode(), errhint(), errmsg(), ERROR, GetDatabaseEncoding(), locale, mbstowcs_l(), pfree(), PG_UTF8, pg_verifymbstr(), pnstrdup(), and str.
Referenced by lowerstr_with_len(), str_initcap(), str_tolower(), str_toupper(), t_isalnum(), t_isalpha(), t_isdigit(), t_isprint(), t_isspace(), and TParserInit().
locale_t make_libc_collator | ( | const char * | collate, |
const char * | ctype | ||
) |
Definition at line 53 of file pg_locale_libc.c.
References ereport, errcode(), errmsg(), ERROR, locale_t, and report_newlocale_failure().
Referenced by init_database_collation(), and pg_newlocale_from_collation().
|
static |
Definition at line 335 of file pg_locale_libc.c.
References generate_unaccent_rules::dest, and locale_t.
Referenced by char2wchar().
|
static |
Definition at line 301 of file pg_locale_libc.c.
References ereport, errcode(), errdetail(), errmsg(), and ERROR.
Referenced by make_libc_collator().
int strncoll_libc | ( | const char * | arg1, |
ssize_t | len1, | ||
const char * | arg2, | ||
ssize_t | len2, | ||
pg_locale_t | locale | ||
) |
Definition at line 124 of file pg_locale_libc.c.
References Assert, buf, GetDatabaseEncoding(), locale, palloc(), pfree(), PG_UTF8, strcoll_l, and TEXTBUFLEN.
Referenced by pg_strcoll(), and pg_strncoll().
size_t strnxfrm_libc | ( | char * | dest, |
size_t | destsize, | ||
const char * | src, | ||
ssize_t | srclen, | ||
pg_locale_t | locale | ||
) |
Definition at line 189 of file pg_locale_libc.c.
References Assert, buf, bufsize, generate_unaccent_rules::dest, locale, palloc(), pfree(), strxfrm_l, and TEXTBUFLEN.
Referenced by pg_strnxfrm(), and pg_strxfrm().
size_t wchar2char | ( | char * | to, |
const wchar_t * | from, | ||
size_t | tolen, | ||
pg_locale_t | locale | ||
) |
Definition at line 379 of file pg_locale_libc.c.
References Assert, GetDatabaseEncoding(), locale, PG_UTF8, and wcstombs_l().
Referenced by lowerstr_with_len(), str_initcap(), str_tolower(), and str_toupper().
|
static |
Definition at line 351 of file pg_locale_libc.c.
References generate_unaccent_rules::dest, and locale_t.
Referenced by wchar2char().