PostgreSQL Source Code git master
Loading...
Searching...
No Matches
jsonpath_scan.l File Reference
#include "postgres.h"
#include "jsonpath_internal.h"
#include "jsonpath_gram.h"
#include "mb/pg_wchar.h"
#include "nodes/miscnodes.h"
#include "nodes/pg_list.h"

Go to the source code of this file.

Data Structures

struct  jsonpath_yy_extra_type
 
struct  JsonPathKeyword
 

Macros

#define fprintf(file, fmt, msg)   fprintf_to_ereport(fmt, msg)
 
#define yyextra   (((struct yyguts_t *) yyscanner)->yyextra_r)
 

Typedefs

typedef struct JsonPathKeyword JsonPathKeyword
 

Functions

static void addstring (bool init, char *s, int l, yyscan_t yyscanner)
 
static void addchar (bool init, char c, yyscan_t yyscanner)
 
static enum yytokentype checkKeyword (yyscan_t yyscanner)
 
static bool parseUnicode (char *s, int l, struct Node *escontext, yyscan_t yyscanner)
 
static bool parseHexChar (char *s, struct Node *escontext, yyscan_t yyscanner)
 
static void fprintf_to_ereport (const char *fmt, const char *msg)
 
int yylex (YYSTYPE *yylval_param, yyscan_t yyscanner)
 
void jsonpath_yyerror (JsonPathParseResult **result, struct Node *escontext, yyscan_t yyscanner, const char *message)
 
static void resizeString (bool init, int appendLen, yyscan_t yyscanner)
 
JsonPathParseResultparsejsonpath (const char *str, int len, struct Node *escontext)
 
static bool hexval (char c, int *result, struct Node *escontext, yyscan_t yyscanner)
 
static bool addUnicodeChar (char32_t ch, struct Node *escontext, yyscan_t yyscanner)
 
static bool addUnicode (char32_t ch, int *hi_surrogate, struct Node *escontext, yyscan_t yyscanner)
 
voidjsonpath_yyalloc (yy_size_t bytes, yyscan_t yyscanner)
 
voidjsonpath_yyrealloc (void *ptr, yy_size_t bytes, yyscan_t yyscanner)
 
void jsonpath_yyfree (void *ptr, yyscan_t yyscanner)
 

Variables

static const JsonPathKeyword keywords []
 

Macro Definition Documentation

◆ fprintf

#define fprintf (   file,
  fmt,
  msg 
)    fprintf_to_ereport(fmt, msg)

Definition at line 46 of file jsonpath_scan.l.

◆ yyextra

#define yyextra   (((struct yyguts_t *) yyscanner)->yyextra_r)

Definition at line 359 of file jsonpath_scan.l.

Typedef Documentation

◆ JsonPathKeyword

Function Documentation

◆ addchar()

static void addchar ( bool  init,
char  c,
yyscan_t  yyscanner 
)
static

Definition at line 526 of file jsonpath_scan.l.

527{
528 resizeString(init, 1, yyscanner);
529 yyextra->scanstring.val[yyextra->scanstring.len] = c;
530 if (c != '\0')
531 yyextra->scanstring.len++;
static void resizeString(bool init, int appendLen, yyscan_t yyscanner)
#define yyextra
char * c
#define init()
532}

References init, resizeString(), and yyextra.

◆ addstring()

static void addstring ( bool  init,
char s,
int  l,
yyscan_t  yyscanner 
)
static

Definition at line 517 of file jsonpath_scan.l.

518{
519 resizeString(init, l + 1, yyscanner);
520 memcpy(yyextra->scanstring.val + yyextra->scanstring.len, s, l);
521 yyextra->scanstring.len += l;
memcpy(sums, checksumBaseOffsets, sizeof(checksumBaseOffsets))
522}

References init, memcpy(), resizeString(), and yyextra.

Referenced by addUnicodeChar().

◆ addUnicode()

static bool addUnicode ( char32_t  ch,
int hi_surrogate,
struct Node escontext,
yyscan_t  yyscanner 
)
static

Definition at line 618 of file jsonpath_scan.l.

619{
621 {
622 if (*hi_surrogate != -1)
623 ereturn(escontext, false,
625 errmsg("invalid input syntax for type %s", "jsonpath"),
626 errdetail("Unicode high surrogate must not follow "
627 "a high surrogate.")));
628 *hi_surrogate = ch;
629 return true;
630 }
632 {
633 if (*hi_surrogate == -1)
634 ereturn(escontext, false,
636 errmsg("invalid input syntax for type %s", "jsonpath"),
637 errdetail("Unicode low surrogate must follow a high "
638 "surrogate.")));
640 *hi_surrogate = -1;
641 }
642 else if (*hi_surrogate != -1)
643 {
644 ereturn(escontext, false,
646 errmsg("invalid input syntax for type %s", "jsonpath"),
647 errdetail("Unicode low surrogate must follow a high "
648 "surrogate.")));
649 }
int errcode(int sqlerrcode)
Definition elog.c:874
#define ereturn(context, dummy_value,...)
Definition elog.h:280
int errdetail(const char *fmt,...) pg_attribute_printf(1
static char * errmsg
static bool is_utf16_surrogate_first(char32_t c)
Definition pg_wchar.h:378
static bool is_utf16_surrogate_second(char32_t c)
Definition pg_wchar.h:384
static char32_t surrogate_pair_to_codepoint(char16_t first, char16_t second)
Definition pg_wchar.h:390
static int fb(int x)
650
651 return addUnicodeChar(ch, escontext, yyscanner);
static bool addUnicodeChar(char32_t ch, struct Node *escontext, yyscan_t yyscanner)
652}

References addUnicodeChar(), ereturn, errcode(), errdetail(), errmsg, fb(), is_utf16_surrogate_first(), is_utf16_surrogate_second(), and surrogate_pair_to_codepoint().

Referenced by parseUnicode().

◆ addUnicodeChar()

static bool addUnicodeChar ( char32_t  ch,
struct Node escontext,
yyscan_t  yyscanner 
)
static

Definition at line 585 of file jsonpath_scan.l.

586{
587 if (ch == 0)
588 {
589 /* We can't allow this, since our TEXT type doesn't */
590 ereturn(escontext, false,
592 errmsg("unsupported Unicode escape sequence"),
593 errdetail("\\u0000 cannot be converted to text.")));
594 }
595 else
596 {
#define MAX_UNICODE_EQUIVALENT_STRING
Definition pg_wchar.h:182
598
599 /*
600 * If we're trapping the error status, call the noerror form of the
601 * conversion function. Otherwise call the normal form which provides
602 * more detailed errors.
603 */
604
605 if (!escontext || !IsA(escontext, ErrorSaveContext))
606 pg_unicode_to_server(ch, (unsigned char *) cbuf);
607 else if (!pg_unicode_to_server_noerror(ch, (unsigned char *) cbuf))
608 ereturn(escontext, false,
610 errmsg("could not convert Unicode to server encoding")));
611 addstring(false, cbuf, strlen(cbuf), yyscanner);
612 }
613 return true;
static void addstring(bool init, char *s, int l, yyscan_t yyscanner)
bool pg_unicode_to_server_noerror(char32_t c, unsigned char *s)
Definition mbutils.c:937
void pg_unicode_to_server(char32_t c, unsigned char *s)
Definition mbutils.c:875
#define IsA(nodeptr, _type_)
Definition nodes.h:164
614}

References addstring(), ereturn, errcode(), errdetail(), errmsg, fb(), IsA, MAX_UNICODE_EQUIVALENT_STRING, pg_unicode_to_server(), and pg_unicode_to_server_noerror().

Referenced by addUnicode(), and parseHexChar().

◆ checkKeyword()

static enum yytokentype checkKeyword ( yyscan_t  yyscanner)
static

Definition at line 450 of file jsonpath_scan.l.

451{
452 int res = IDENT_P;
453 int diff;
456 *StopMiddle;
#define lengthof(array)
Definition c.h:873
static const JsonPathKeyword keywords[]
457
458 if (yyextra->scanstring.len > keywords[lengthof(keywords) - 1].len)
459 return res;
const void size_t len
460
461 while (StopLow < StopHigh)
462 {
463 StopMiddle = StopLow + ((StopHigh - StopLow) >> 1);
464
465 if (StopMiddle->len == yyextra->scanstring.len)
466 diff = pg_strncasecmp(StopMiddle->keyword, yyextra->scanstring.val,
467 yyextra->scanstring.len);
468 else
469 diff = StopMiddle->len - yyextra->scanstring.len;
int pg_strncasecmp(const char *s1, const char *s2, size_t n)
470
471 if (diff < 0)
472 StopLow = StopMiddle + 1;
473 else if (diff > 0)
475 else
476 {
477 if (StopMiddle->lowercase)
478 diff = strncmp(StopMiddle->keyword, yyextra->scanstring.val,
479 yyextra->scanstring.len);
480
481 if (diff == 0)
482 res = StopMiddle->val;
483
484 break;
485 }
486 }
487
488 return res;
489}

References fb(), keywords, len, lengthof, pg_strncasecmp(), and yyextra.

◆ fprintf_to_ereport()

static void fprintf_to_ereport ( const char fmt,
const char msg 
)
static

Definition at line 49 of file jsonpath_scan.l.

50{
51 ereport(ERROR, (errmsg_internal("%s", msg)));
int int errmsg_internal(const char *fmt,...) pg_attribute_printf(1
#define ERROR
Definition elog.h:40
#define ereport(elevel,...)
Definition elog.h:152
52}

References ereport, errmsg_internal(), and ERROR.

◆ hexval()

static bool hexval ( char  c,
int result,
struct Node escontext,
yyscan_t  yyscanner 
)
static

Definition at line 562 of file jsonpath_scan.l.

563{
564 if (c >= '0' && c <= '9')
565 {
566 *result = c - '0';
567 return true;
568 }
569 if (c >= 'a' && c <= 'f')
570 {
571 *result = c - 'a' + 0xA;
572 return true;
573 }
574 if (c >= 'A' && c <= 'F')
575 {
576 *result = c - 'A' + 0xA;
577 return true;
578 }
579 jsonpath_yyerror(NULL, escontext, yyscanner, "invalid hexadecimal digit");
580 return false;
uint32 result
void jsonpath_yyerror(JsonPathParseResult **result, struct Node *escontext, yyscan_t yyscanner, const char *message)
581}

References fb(), jsonpath_yyerror(), and result.

Referenced by parseHexChar(), and parseUnicode().

◆ jsonpath_yyalloc()

void * jsonpath_yyalloc ( yy_size_t  bytes,
yyscan_t  yyscanner 
)

Definition at line 730 of file jsonpath_scan.l.

731{
732 return palloc(bytes);
void * palloc(Size size)
Definition mcxt.c:1387
733}

References palloc().

◆ jsonpath_yyerror()

void jsonpath_yyerror ( JsonPathParseResult **  result,
struct Node escontext,
yyscan_t  yyscanner,
const char message 
)

Definition at line 362 of file jsonpath_scan.l.

365{
366 struct yyguts_t *yyg = (struct yyguts_t *) yyscanner; /* needed for yytext
367 * macro */
368
369 /* don't overwrite escontext if it's already been set */
370 if (SOFT_ERROR_OCCURRED(escontext))
371 return;
#define SOFT_ERROR_OCCURRED(escontext)
Definition miscnodes.h:53
372
374 {
375 errsave(escontext,
377 /* translator: %s is typically "syntax error" */
378 errmsg("%s at end of jsonpath input", _(message))));
379 }
380 else
381 {
382 errsave(escontext,
384 /* translator: first %s is typically "syntax error" */
385 errmsg("%s at or near \"%s\" of jsonpath input",
386 _(message), yytext)));
387 }
#define _(x)
Definition elog.c:95
#define errsave(context,...)
Definition elog.h:264
388}

References _, errcode(), errmsg, errsave, fb(), and SOFT_ERROR_OCCURRED.

Referenced by hexval(), and parsejsonpath().

◆ jsonpath_yyfree()

void jsonpath_yyfree ( void ptr,
yyscan_t  yyscanner 
)

Definition at line 745 of file jsonpath_scan.l.

746{
747 if (ptr)
748 pfree(ptr);
void pfree(void *pointer)
Definition mcxt.c:1616
749}

References pfree().

◆ jsonpath_yyrealloc()

void * jsonpath_yyrealloc ( void ptr,
yy_size_t  bytes,
yyscan_t  yyscanner 
)

Definition at line 736 of file jsonpath_scan.l.

737{
738 if (ptr)
739 return repalloc(ptr, bytes);
740 else
741 return palloc(bytes);
void * repalloc(void *pointer, Size size)
Definition mcxt.c:1632
742}

References palloc(), and repalloc().

◆ parseHexChar()

static bool parseHexChar ( char s,
struct Node escontext,
yyscan_t  yyscanner 
)
static

Definition at line 708 of file jsonpath_scan.l.

709{
710 int s2,
711 s3,
712 ch;
char * s2
char * s3
713
714 if (!hexval(s[2], &s2, escontext, yyscanner))
715 return false;
716 if (!hexval(s[3], &s3, escontext, yyscanner))
717 return false;
static bool hexval(char c, int *result, struct Node *escontext, yyscan_t yyscanner)
718
719 ch = (s2 << 4) | s3;
720
721 return addUnicodeChar(ch, escontext, yyscanner);
722}

References addUnicodeChar(), fb(), hexval(), s2, and s3.

◆ parsejsonpath()

JsonPathParseResult * parsejsonpath ( const char str,
int  len,
struct Node escontext 
)

Definition at line 536 of file jsonpath_scan.l.

537{
539 yyscan_t scanner;
void * yyscan_t
Definition cubedata.h:65
TestSpec parseresult
541
542 if (jsonpath_yylex_init(&scanner) != 0)
543 elog(ERROR, "yylex_init() failed: %m");
#define elog(elevel,...)
Definition elog.h:228
544
545 yyset_extra(&yyext, scanner);
546
547 if (len <= 0)
548 len = strlen(str);
const char * str
549
550 jsonpath_yy_scan_bytes(str, len, scanner);
551
552 if (jsonpath_yyparse(&parseresult, escontext, scanner) != 0)
553 jsonpath_yyerror(NULL, escontext, scanner, "invalid input"); /* shouldn't happen */
int jsonpath_yyparse(JsonPathParseResult **result, struct Node *escontext, yyscan_t yyscanner)
554
555 jsonpath_yylex_destroy(scanner);
556
557 return parseresult;
558}

References elog, ERROR, fb(), jsonpath_yyerror(), jsonpath_yyparse(), len, parseresult, and str.

Referenced by jsonPathFromCstring().

◆ parseUnicode()

static bool parseUnicode ( char s,
int  l,
struct Node escontext,
yyscan_t  yyscanner 
)
static

Definition at line 659 of file jsonpath_scan.l.

660{
661 int i = 2;
662 int hi_surrogate = -1;
int i
Definition isn.c:77
663
664 for (i = 2; i < l; i += 2) /* skip '\u' */
665 {
666 char32_t ch = 0;
667 int j,
668 si;
int j
Definition isn.c:78
669
670 if (s[i] == '{') /* parse '\u{XX...}' */
671 {
672 while (s[++i] != '}' && i < l)
673 {
674 if (!hexval(s[i], &si, escontext, yyscanner))
675 return false;
676 ch = (ch << 4) | si;
677 }
678 i++; /* skip '}' */
679 }
680 else /* parse '\uXXXX' */
681 {
682 for (j = 0; j < 4 && i < l; j++)
683 {
684 if (!hexval(s[i++], &si, escontext, yyscanner))
685 return false;
686 ch = (ch << 4) | si;
687 }
688 }
689
690 if (!addUnicode(ch, &hi_surrogate, escontext, yyscanner))
691 return false;
692 }
static bool addUnicode(char32_t ch, int *hi_surrogate, struct Node *escontext, yyscan_t yyscanner)
693
694 if (hi_surrogate != -1)
695 {
696 ereturn(escontext, false,
698 errmsg("invalid input syntax for type %s", "jsonpath"),
699 errdetail("Unicode low surrogate must follow a high "
700 "surrogate.")));
701 }
702
703 return true;
704}

References addUnicode(), ereturn, errcode(), errdetail(), errmsg, fb(), hexval(), i, and j.

◆ resizeString()

static void resizeString ( bool  init,
int  appendLen,
yyscan_t  yyscanner 
)
static

Definition at line 496 of file jsonpath_scan.l.

497{
498 if (init)
499 {
500 yyextra->scanstring.total = Max(32, appendLen);
501 yyextra->scanstring.val = (char *) palloc(yyextra->scanstring.total);
502 yyextra->scanstring.len = 0;
503 }
504 else
505 {
506 if (yyextra->scanstring.len + appendLen >= yyextra->scanstring.total)
507 {
508 while (yyextra->scanstring.len + appendLen >= yyextra->scanstring.total)
509 yyextra->scanstring.total *= 2;
510 yyextra->scanstring.val = repalloc(yyextra->scanstring.val, yyextra->scanstring.total);
511 }
512 }
#define Max(x, y)
Definition c.h:1085
513}

References fb(), init, Max, palloc(), repalloc(), and yyextra.

Referenced by addchar(), and addstring().

◆ yylex()

int yylex ( YYSTYPE yylval_param,
yyscan_t  yyscanner 
)

Definition at line 120 of file jsonpath_scan.l.

122 {other}+ {
123 addstring(false, yytext, yyleng, yyscanner);
124 }
#define yyleng
Definition scan.l:1108
125
126<xnq>{blank}+ {
127 yylval->str = yyextra->scanstring;
129 return checkKeyword(yyscanner);
130 }
static enum yytokentype checkKeyword(yyscan_t yyscanner)
131
132<xnq>\/\* {
133 yylval->str = yyextra->scanstring;
134 BEGIN xc;
135 }
136
137<xnq>({special}|\") {
138 yylval->str = yyextra->scanstring;
139 yyless(0);
141 return checkKeyword(yyscanner);
142 }
143
144<xnq><<EOF>> {
145 yylval->str = yyextra->scanstring;
147 return checkKeyword(yyscanner);
148 }
149
150<xnq,xq,xvq>\\b { addchar(false, '\b', yyscanner); }
151
152<xnq,xq,xvq>\\f { addchar(false, '\f', yyscanner); }
153
154<xnq,xq,xvq>\\n { addchar(false, '\n', yyscanner); }
155
156<xnq,xq,xvq>\\r { addchar(false, '\r', yyscanner); }
157
158<xnq,xq,xvq>\\t { addchar(false, '\t', yyscanner); }
159
160<xnq,xq,xvq>\\v { addchar(false, '\v', yyscanner); }
161
162<xnq,xq,xvq>{unicode}+ {
163 if (!parseUnicode(yytext, yyleng, escontext, yyscanner))
164 yyterminate();
165 }
static bool parseUnicode(char *s, int l, struct Node *escontext, yyscan_t yyscanner)
166
167<xnq,xq,xvq>{hex_char} {
168 if (!parseHexChar(yytext, escontext, yyscanner))
169 yyterminate();
170 }
static bool parseHexChar(char *s, struct Node *escontext, yyscan_t yyscanner)
171
172<xnq,xq,xvq>{unicode}*{unicodefail} {
173 jsonpath_yyerror(NULL, escontext, yyscanner,
174 "invalid Unicode escape sequence");
175 yyterminate();
176 }
177
178<xnq,xq,xvq>{hex_fail} {
179 jsonpath_yyerror(NULL, escontext, yyscanner,
180 "invalid hexadecimal character sequence");
181 yyterminate();
182 }
183
184<xnq,xq,xvq>{unicode}+\\ {
185 /* throw back the \\, and treat as unicode */
186 yyless(yyleng - 1);
187 if (!parseUnicode(yytext, yyleng, escontext, yyscanner))
188 yyterminate();
189 }
190
191<xnq,xq,xvq>\\. { addchar(false, yytext[1], yyscanner); }
192
193<xnq,xq,xvq>\\ {
194 jsonpath_yyerror(NULL, escontext, yyscanner,
195 "unexpected end after backslash");
196 yyterminate();
197 }
198
199<xq,xvq><<EOF>> {
200 jsonpath_yyerror(NULL, escontext, yyscanner,
201 "unterminated quoted string");
202 yyterminate();
203 }
204
205<xq>\" {
206 yylval->str = yyextra->scanstring;
208 return STRING_P;
209 }
210
211<xvq>\" {
212 yylval->str = yyextra->scanstring;
214 return VARIABLE_P;
215 }
216
217<xq,xvq>[^\\\"]+ { addstring(false, yytext, yyleng, yyscanner); }
218
219<xc>\*\/ { BEGIN INITIAL; }
220
221<xc>[^\*]+ { }
222
223<xc>\* { }
224
225<xc><<EOF>> {
226 jsonpath_yyerror(NULL, escontext, yyscanner,
227 "unexpected end of comment");
228 yyterminate();
229 }
230\&\& { return AND_P; }
231
232\|\| { return OR_P; }
233
234\! { return NOT_P; }
235
236\*\* { return ANY_P; }
237
238\< { return LESS_P; }
239
240\<\= { return LESSEQUAL_P; }
241
242\=\= { return EQUAL_P; }
243
244\<> { return NOTEQUAL_P; }
245
246\!\= { return NOTEQUAL_P; }
247
248\>\= { return GREATEREQUAL_P; }
249
250\> { return GREATER_P; }
251
252\${other}+ {
253 addstring(true, yytext + 1, yyleng - 1, yyscanner);
254 addchar(false, '\0', yyscanner);
255 yylval->str = yyextra->scanstring;
256 return VARIABLE_P;
257 }
static void addchar(bool init, char c, yyscan_t yyscanner)
258
259\$\" {
260 addchar(true, '\0', yyscanner);
261 BEGIN xvq;
262 }
263
264{special} { return *yytext; }
265
266{blank}+ { /* ignore */ }
267
268\/\* {
269 addchar(true, '\0', yyscanner);
270 BEGIN xc;
271 }
272
273{real} {
274 addstring(true, yytext, yyleng, yyscanner);
275 addchar(false, '\0', yyscanner);
276 yylval->str = yyextra->scanstring;
277 return NUMERIC_P;
278 }
279
280{decimal} {
281 addstring(true, yytext, yyleng, yyscanner);
282 addchar(false, '\0', yyscanner);
283 yylval->str = yyextra->scanstring;
284 return NUMERIC_P;
285 }
286
287{decinteger} {
288 addstring(true, yytext, yyleng, yyscanner);
289 addchar(false, '\0', yyscanner);
290 yylval->str = yyextra->scanstring;
291 return INT_P;
292 }
293
294{hexinteger} {
295 addstring(true, yytext, yyleng, yyscanner);
296 addchar(false, '\0', yyscanner);
297 yylval->str = yyextra->scanstring;
298 return INT_P;
299 }
300
301{octinteger} {
302 addstring(true, yytext, yyleng, yyscanner);
303 addchar(false, '\0', yyscanner);
304 yylval->str = yyextra->scanstring;
305 return INT_P;
306 }
307
308{bininteger} {
309 addstring(true, yytext, yyleng, yyscanner);
310 addchar(false, '\0', yyscanner);
311 yylval->str = yyextra->scanstring;
312 return INT_P;
313 }
314
315{realfail} {
316 jsonpath_yyerror(NULL, escontext, yyscanner,
317 "invalid numeric literal");
318 yyterminate();
319 }
320{decinteger_junk} {
321 jsonpath_yyerror(NULL, escontext, yyscanner,
322 "trailing junk after numeric literal");
323 yyterminate();
324 }
325{decimal_junk} {
326 jsonpath_yyerror(NULL, escontext, yyscanner,
327 "trailing junk after numeric literal");
328 yyterminate();
329 }
330{real_junk} {
331 jsonpath_yyerror(NULL, escontext, yyscanner,
332 "trailing junk after numeric literal");
333 yyterminate();
334 }
335\" {
336 addchar(true, '\0', yyscanner);
337 BEGIN xq;
338 }
339
340\\ {
341 yyless(0);
342 addchar(true, '\0', yyscanner);
343 BEGIN xnq;
344 }
345
346{other}+ {
347 addstring(true, yytext, yyleng, yyscanner);
348 BEGIN xnq;
349 }
350
351<<EOF>> { yyterminate(); }
352
353%%

Variable Documentation

◆ keywords

const JsonPathKeyword keywords[]
static

Definition at line 402 of file jsonpath_scan.l.

402 {
403 {2, false, IS_P, "is"},
404 {2, false, TO_P, "to"},
405 {3, false, ABS_P, "abs"},
406 {3, false, LAX_P, "lax"},
407 {4, false, DATE_P, "date"},
408 {4, false, FLAG_P, "flag"},
409 {4, false, LAST_P, "last"},
410 {4, true, NULL_P, "null"},
411 {4, false, SIZE_P, "size"},
412 {4, false, TIME_P, "time"},
413 {4, true, TRUE_P, "true"},
414 {4, false, TYPE_P, "type"},
415 {4, false, WITH_P, "with"},
416 {5, false, STR_BTRIM_P, "btrim"},
417 {5, true, FALSE_P, "false"},
418 {5, false, FLOOR_P, "floor"},
419 {5, false, STR_LOWER_P, "lower"},
420 {5, false, STR_LTRIM_P, "ltrim"},
421 {5, false, STR_RTRIM_P, "rtrim"},
422 {5, false, STR_UPPER_P, "upper"},
423 {6, false, BIGINT_P, "bigint"},
424 {6, false, DOUBLE_P, "double"},
425 {6, false, EXISTS_P, "exists"},
426 {6, false, NUMBER_P, "number"},
427 {6, false, STARTS_P, "starts"},
428 {6, false, STRICT_P, "strict"},
429 {6, false, STRINGFUNC_P, "string"},
430 {7, false, BOOLEAN_P, "boolean"},
431 {7, false, CEILING_P, "ceiling"},
432 {7, false, DECIMAL_P, "decimal"},
433 {7, false, STR_INITCAP_P, "initcap"},
434 {7, false, INTEGER_P, "integer"},
435 {7, false, STR_REPLACE_P, "replace"},
436 {7, false, TIME_TZ_P, "time_tz"},
437 {7, false, UNKNOWN_P, "unknown"},
438 {8, false, DATETIME_P, "datetime"},
439 {8, false, KEYVALUE_P, "keyvalue"},
440 {9, false, TIMESTAMP_P, "timestamp"},
441 {10, false, LIKE_REGEX_P, "like_regex"},
442 {10, false, STR_SPLIT_PART_P, "split_part"},
443 {12, false, TIMESTAMP_TZ_P, "timestamp_tz"},
444};

Referenced by check_conn_params(), checkKeyword(), connect_pg_server(), ConnectDatabase(), connectDatabase(), conninfo_array_parse(), construct_connection_params(), constructConnStr(), copy_connection(), do_connect(), doConnect(), ExtractConnectionOptions(), GetConnection(), GetScanKeyword(), libpqsrv_connect_params(), main(), main(), pgfdw_has_required_scram_options(), pgfdw_security_check(), postgres_fdw_connection(), PQconnectdbParams(), PQconnectStartParams(), PQpingParams(), regression_main(), ScanKeywordLookup(), sql_conn(), test_protocol_version(), and vacuumlo().