terrymanu commented on a change in pull request #4477: Parse mysql variable 
value for SET statement
URL: 
https://github.com/apache/incubator-shardingsphere/pull/4477#discussion_r386310205
 
 

 ##########
 File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
 ##########
 @@ -328,3 +328,23 @@ ignoredIdentifier_
 ignoredIdentifiers_
     : ignoredIdentifier_ (COMMA_ ignoredIdentifier_)*
     ;
+
+variableExpr
+    : ((scope? variable (TO | EQ_) variableValue) | (scope? timeZone 
variableValue))
+    ;
+
+variableValue
+    : (identifier | NUMBER_ | (MINUS_ NUMBER_) | STRING_ | DEFAULT | LOCAL)
+    ;
+
+timeZone
+    : TIME ZONE
+    ;
+
+variable
+    : identifier
+    ;
+       
+scope
+    : (SESSION | LOCAL)
+    ;
 
 Review comment:
   Please keep one empty line on the end of file

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to