Go to the source code of this file.
◆ dintdict_init()
Definition at line 35 of file dict_int.c.
36{
40
45
46 foreach(l, dictoptions)
47 {
49
50 if (strcmp(defel->
defname,
"maxlen") == 0)
51 {
53
56 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
57 errmsg(
"maxlen value has to be >= 1")));
58 }
59 else if (strcmp(defel->
defname,
"rejectlong") == 0)
60 {
62 }
63 else if (strcmp(defel->
defname,
"absval") == 0)
64 {
66 }
67 else
68 {
70 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
71 errmsg(
"unrecognized intdict parameter: \"%s\"",
73 }
74 }
75
77}
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 80 of file dict_int.c.
81{
85 char *txt;
87
89
90 if (d->
absval && (in[0] ==
'+' || in[0] ==
'-'))
91 {
94 }
95 else
97
99 {
101 {
102
105 }
106 else
107 {
108
111 }
112 }
113 else
114 {
116 }
117
119}
#define PG_GETARG_INT32(n)
void pfree(void *pointer)
char * pnstrdup(const char *in, Size len)
References DictInt::absval, len, TSLexeme::lexeme, DictInt::maxlen, palloc0(), pfree(), PG_GETARG_INT32, PG_GETARG_POINTER, PG_RETURN_POINTER, pnstrdup(), and DictInt::rejectlong.
◆ PG_FUNCTION_INFO_V1() [1/2]
◆ PG_FUNCTION_INFO_V1() [2/2]
◆ PG_MODULE_MAGIC_EXT()
PG_MODULE_MAGIC_EXT |
( |
. |
name = "dict_int" , |
|
|
. |
version = PG_VERSION |
|
) |
| |