Go to the source code of this file.
◆ dintdict_init()
Definition at line 32 of file dict_int.c.
33{
37
42
43 foreach(l, dictoptions)
44 {
46
47 if (strcmp(defel->
defname,
"maxlen") == 0)
48 {
50
53 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
54 errmsg(
"maxlen value has to be >= 1")));
55 }
56 else if (strcmp(defel->
defname,
"rejectlong") == 0)
57 {
59 }
60 else if (strcmp(defel->
defname,
"absval") == 0)
61 {
63 }
64 else
65 {
67 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
68 errmsg(
"unrecognized intdict parameter: \"%s\"",
70 }
71 }
72
74}
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_POINTER(x)
void * palloc0(Size size)
References DictInt::absval, defGetBoolean(), defGetString(), DefElem::defname, ereport, errcode(), errmsg(), ERROR, lfirst, DictInt::maxlen, palloc0(), PG_GETARG_POINTER, PG_RETURN_POINTER, and DictInt::rejectlong.
◆ dintdict_lexize()
Definition at line 77 of file dict_int.c.
78{
82 char *txt;
84
86
87 if (d->
absval && (in[0] ==
'+' || in[0] ==
'-'))
88 {
91 }
92 else
94
96 {
98 {
99
101 res[0].lexeme = NULL;
102 }
103 else
104 {
105
108 }
109 }
110 else
111 {
113 }
114
116}
static void PGresult * res
#define PG_GETARG_INT32(n)
void pfree(void *pointer)
char * pnstrdup(const char *in, Size len)
References DictInt::absval, len, DictInt::maxlen, palloc0(), pfree(), PG_GETARG_INT32, PG_GETARG_POINTER, PG_RETURN_POINTER, pnstrdup(), DictInt::rejectlong, and res.
◆ PG_FUNCTION_INFO_V1() [1/2]
◆ PG_FUNCTION_INFO_V1() [2/2]
◆ PG_MODULE_MAGIC