28 const char *set,
int setlen,
206 errmsg(
"requested length too large")));
304 errmsg(
"requested length too large")));
396 const char *set,
int setlen,
864 errmsg(
"requested length too large")));
971 result = *
data & 0x07;
974 else if (*
data >= 0xE0)
976 result = *
data & 0x0F;
982 result = *
data & 0x1f;
991 result = (result << 6) + (
data[
i] & 0x3f);
1001 errmsg(
"requested character too large")));
1045 errmsg(
"character number must be positive")));
1049 errmsg(
"null character not permitted")));
1067 errmsg(
"requested character too large for encoding: %u",
1072 else if (
cvalue > 0x07ff)
1086 else if (bytes == 3)
1088 wch[0] = 0xE0 | ((
cvalue >> 12) & 0x0F);
1094 wch[0] = 0xF0 | ((
cvalue >> 18) & 0x07);
1095 wch[1] = 0x80 | ((
cvalue >> 12) & 0x3F);
1108 errmsg(
"requested character not valid for encoding: %u",
1120 errmsg(
"requested character too large for encoding: %u",
1167 errmsg(
"requested length too large")));
1174 for (
i = 0;
i < count;
i++)
#define Assert(condition)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_GETARG_BYTEA_PP(n)
#define PG_GETARG_TEXT_PP(n)
#define PG_RETURN_BYTEA_P(x)
#define PG_RETURN_TEXT_P(x)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_GET_COLLATION()
static bool pg_mul_s32_overflow(int32 a, int32 b, int32 *result)
static bool pg_add_s32_overflow(int32 a, int32 b, int32 *result)
int GetDatabaseEncoding(void)
int pg_mbstrlen_with_len(const char *mbstr, int limit)
int pg_mblen_unbounded(const char *mbstr)
int pg_mblen_range(const char *mbstr, const char *end)
int pg_database_encoding_max_length(void)
void pfree(void *pointer)
#define AllocSizeIsValid(size)
#define CHECK_FOR_INTERRUPTS()
static text * dotrim(const char *string, int stringlen, const char *set, int setlen, bool doltrim, bool dortrim)
Datum bytealtrim(PG_FUNCTION_ARGS)
Datum ltrim(PG_FUNCTION_ARGS)
Datum byteatrim(PG_FUNCTION_ARGS)
Datum lower(PG_FUNCTION_ARGS)
Datum initcap(PG_FUNCTION_ARGS)
Datum upper(PG_FUNCTION_ARGS)
Datum byteartrim(PG_FUNCTION_ARGS)
Datum rtrim(PG_FUNCTION_ARGS)
Datum rpad(PG_FUNCTION_ARGS)
Datum ltrim1(PG_FUNCTION_ARGS)
Datum btrim1(PG_FUNCTION_ARGS)
Datum ascii(PG_FUNCTION_ARGS)
Datum rtrim1(PG_FUNCTION_ARGS)
Datum casefold(PG_FUNCTION_ARGS)
Datum translate(PG_FUNCTION_ARGS)
static bytea * dobyteatrim(bytea *string, bytea *set, bool doltrim, bool dortrim)
Datum lpad(PG_FUNCTION_ARGS)
Datum btrim(PG_FUNCTION_ARGS)
Datum repeat(PG_FUNCTION_ARGS)
const unsigned char * pend
static rewind_source * source
static Size VARSIZE_ANY_EXHDR(const void *PTR)
static char * VARDATA(const void *PTR)
static char * VARDATA_ANY(const void *PTR)
static void SET_VARSIZE(void *PTR, Size len)
text * cstring_to_text_with_len(const char *s, int len)
text * cstring_to_text(const char *s)
bool pg_utf8_islegal(const unsigned char *source, int length)
int pg_encoding_max_length(int encoding)