greenplumn parse_keyword 源码
greenplumn parse_keyword 代码
文件路径:/gpcontrib/orafce/parse_keyword.c
#include "postgres.h"
#include "parse_keyword.h"
#include "parser/gramparse.h"
#if PG_VERSION_NUM >= 90600
#include "common/keywords.h"
#else
#include "parser/keywords.h"
#endif
#if PG_VERSION_NUM >= 120000
const char *
orafce_scan_keyword(const char *text, int *keycode)
{
int kwnum;
kwnum = ScanKeywordLookup(text, &ScanKeywords);
if (kwnum >= 0)
{
*keycode = ScanKeywordTokens[kwnum];
return GetScanKeyword(kwnum, &ScanKeywords);
}
return NULL;
}
#else
const char *
orafce_scan_keyword(const char *text, int *keycode)
{
const ScanKeyword *keyword;
keyword = ScanKeywordLookup(text, ScanKeywords, NumScanKeywords);
if (keyword)
{
*keycode = keyword->value;
return keyword->name;
}
return NULL;
}
#endif
相关信息
相关文章
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦