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 2022/06/10 04:26:18 UTC

[GitHub] [shardingsphere] ThanoshanMV commented on a diff in pull request #18272: Add PostgreSQL Copy Statement

ThanoshanMV commented on code in PR #18272:
URL: https://github.com/apache/shardingsphere/pull/18272#discussion_r894141503


##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DMLStatement.g4:
##########
@@ -463,60 +463,38 @@ checkpoint
     ;
 
 copy
-    : COPY (BINARY)? qualifiedName (LP_ columnList RP_)? (FROM | TO) PROGRAM?
-      (STRING_ | STDIN | STDOUT) copyDelimiter? (WITH)? copyOptions whereClause?
-    | COPY LP_ preparableStmt RP_ TO PROGRAM? (STRING_ | STDIN | STDOUT) WITH? copyOptions
+    : copyWithTableOrQuery | copyWithTableOrQueryBinaryCsv | copyWithTableBinary
     ;
 
-copyOptions
-    : copyOptList | LP_ copyGenericOptList RP_
+copyWithTableOrQuery
+    : COPY (tableName columnNames? | LP_ preparableStmt RP_) (FROM | TO) (fileName | PROGRAM STRING_ | STDIN | STDOUT) (WITH? LP_ copyOptionList RP_)? whereClause?

Review Comment:
   Sure @strongduanmu, I've changed `tableName` to `qualifiedName`.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org