21 #include "utils/fmgrprotos.h"
24 #define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
25 #define TOOCTAL(c) ((c) + '0')
26 #define FROMOCTAL(c) ((unsigned char) (c) - '0')
45 if (strlen(ch) == 4 && ch[0] ==
'\\' &&
67 char *result = (
char *)
palloc(5);
72 result[1] =
TOOCTAL(((
unsigned char) ch) >> 6);
73 result[2] =
TOOCTAL((((
unsigned char) ch) >> 3) & 07);
74 result[3] =
TOOCTAL(((
unsigned char) ch) & 07);
194 if (arg1 < SCHAR_MIN || arg1 > SCHAR_MAX)
196 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
197 errmsg(
"\"char\" out of range")));
242 (
VARDATA(result))[2] =
TOOCTAL((((
unsigned char) arg1) >> 3) & 07);
245 else if (arg1 !=
'\0')
#define IS_HIGHBIT_SET(ch)
Datum charge(PG_FUNCTION_ARGS)
Datum charle(PG_FUNCTION_ARGS)
Datum chareq(PG_FUNCTION_ARGS)
Datum charrecv(PG_FUNCTION_ARGS)
Datum chargt(PG_FUNCTION_ARGS)
Datum chartoi4(PG_FUNCTION_ARGS)
Datum text_char(PG_FUNCTION_ARGS)
Datum charne(PG_FUNCTION_ARGS)
Datum charin(PG_FUNCTION_ARGS)
Datum charsend(PG_FUNCTION_ARGS)
Datum charlt(PG_FUNCTION_ARGS)
Datum charout(PG_FUNCTION_ARGS)
Datum char_text(PG_FUNCTION_ARGS)
Datum i4tochar(PG_FUNCTION_ARGS)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_GETARG_TEXT_PP(n)
#define PG_RETURN_BYTEA_P(x)
#define PG_GETARG_CHAR(n)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_CSTRING(x)
#define PG_GETARG_CSTRING(n)
#define PG_RETURN_CHAR(x)
#define PG_RETURN_TEXT_P(x)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_RETURN_BOOL(x)
StringInfoData * StringInfo
#define SET_VARSIZE(PTR, len)
#define VARSIZE_ANY_EXHDR(PTR)