forked from openGauss-Ecosystem/openGauss-server
修复gram.y处修改有误的地方
This commit is contained in:
parent
bc287c614c
commit
eab31941d1
|
@ -31,7 +31,7 @@ include $(top_builddir)/src/Makefile.global
|
|||
include $(top_builddir)/src/Makefile.shlib
|
||||
parser.o gram.o: scan.cpp
|
||||
gram.hpp: gram.cpp
|
||||
gram.o kwlookup.o parser.o: gram.hpp
|
||||
gram.o kwlookup.o parser.o: gram.hpp kwlist_d.h
|
||||
scan.o: gram.hpp scan.cpp
|
||||
#gram.cpp: build-parser
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "access/tupdesc.h"
|
||||
#include "nodes/parsenodes_common.h"
|
||||
#include "gram.hpp"
|
||||
#include "parser/keywords.h"
|
||||
#include "parser/kwlookup.h"
|
||||
|
||||
/*
|
||||
* ScanKeywordLookup - see if a given word is a keyword
|
||||
|
|
|
@ -6487,7 +6487,7 @@ is_unreserved_keyword_func(const char *name)
|
|||
static bool
|
||||
is_unreservedkeywordfunction(int kwnum, bool no_parenthesis, const char *name)
|
||||
{
|
||||
if (kwnum >= 0 && no_parenthesis && ScanKeywordCategories[kwnum] != UNRESERVED_KEYWORD && !is_unreserved_keyword_func(name))
|
||||
if (kwnum >= 0 && no_parenthesis && ScanKeywordCategories[kwnum] == UNRESERVED_KEYWORD && !is_unreserved_keyword_func(name))
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
@ -6541,7 +6541,7 @@ is_function(const char *name, bool is_assign, bool no_parenthesis, List* funcNam
|
|||
|
||||
int kwnum = ScanKeywordLookup(cp[0], &ScanKeywords);
|
||||
/* function name can not be reserved keyword */
|
||||
if (kwnum >= 0 && ScanKeywordCategories[kwnum] != UNRESERVED_KEYWORD)
|
||||
if (kwnum >= 0 && ScanKeywordCategories[kwnum] == RESERVED_KEYWORD)
|
||||
return false;
|
||||
/* function name can not be unreserved keyword when no-parenthesis function is called. except log function*/
|
||||
if (!is_unreservedkeywordfunction(kwnum, no_parenthesis, cp[0]))
|
||||
|
|
Loading…
Reference in New Issue