You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/02/29 11:24:42 UTC

[GitHub] [incubator-shardingsphere] yuzel commented on a change in pull request #4525: #4482 Correct the `DataTypeName` for PostgreSQL

yuzel commented on a change in pull request #4525: #4482 Correct the `DataTypeName` for PostgreSQL
URL: https://github.com/apache/incubator-shardingsphere/pull/4525#discussion_r386021630
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4
 ##########
 @@ -303,7 +303,14 @@ dataType
     ;
 
 dataTypeName
-    : identifier
+    : INT | SMALLINT | INTEGER | BIGINT | DECIMAL | NUMERIC | REAL | FLOAT | doublePrecision | SMALLSERIAL | SERIAL | BIGSERIAL
+    | MONEY | VARCHAR | CHARACTER | CHAR | TEXT | NAME | BYTEA | TIMESTAMP | DATE | TIME | INTERVAL | BOOLEAN | ENUM | POINT
+    | LINE | LSEG | BOX | PATH | POLYGON | CIRCLE | CIDR | INET | MACADDR | BIT | VARBIT | TSVECTOR | TSQUERY | UUID | XML
+    | JSON | INTRANGE | NUMRANGE | TSRANGE | TSTZRANGE | DATERANGE | ARRAY | identifier
+    ;
+
+doublePrecision
 
 Review comment:
   > Why does `doublePrecision` not exist in `PostgreSQLKeyword.g4 `?
   
   DOUBLE and PRECISION exist in KeyWord.g4, so I added an expression to represent double precision. Now I find that it is better to add keywords directly, I will change to keyword and remove doublePrecision.
   `DOUBLEPRECISION
       : D O U B L E [ ]+ P R E C I S I O N
       ;`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services