粘贴到SQL / Vertica终端时抑制错误消息

时间:2015-02-20 19:49:17

标签: command-line-interface suppress-warnings vertica

当我将我的SQL代码粘贴到Vertica Analytic Database交互式终端时,我会在每行代码后收到:

owen(> 
ABORT           BEGIN           COPY            DROP            EXPLAIN       LOCK            RESET           SAMPLE STORAGE  SET             TRUNCATE        
ALTER           COMMENT         CREATE          END             GRANT           PREPARE         REVOKE          SAVEPOINT       SHOW            UPDATE          
ANALYZE         COMMIT          DELETE          EXECUTE         INSERT          RELEASE         ROLLBACK        SELECT          START           
owen(> 
ABORT           BEGIN           COPY            DROP            EXPLAIN         LOCK            RESET           SAMPLE STORAGE  SET             TRUNCATE        
ALTER           COMMENT         CREATE          END             GRANT           PREPARE         REVOKE          SAVEPOINT       SHOW            UPDATE          
ANALYZE         COMMIT          DELETE          EXECUTE         INSERT          RELEASE         ROLLBACK        SELECT          START           
 owen(> and source_ts >= extract(epoch from timestamp :start_date at timezone :timezone)
owen(> 
ABORT           BEGIN           COPY            DROP            EXPLAIN         LOCK            RESET           SAMPLE STORAGE  SET             TRUNCATE        
ALTER           COMMENT         CREATE          END             GRANT           PREPARE         REVOKE          SAVEPOINT       SHOW            UPDATE          
ANALYZE         COMMIT          DELETE          EXECUTE         INSERT          RELEASE         ROLLBACK        SELECT          START           
owen(> 
ABORT           BEGIN           COPY            DROP            EXPLAIN         LOCK            RESET           SAMPLE STORAGE  SET             TRUNCATE        
ALTER           COMMENT         CREATE          END             GRANT           PREPARE         REVOKE          SAVEPOINT       SHOW            UPDATE          
ANALYZE         COMMIT          DELETE          EXECUTE         INSERT          RELEASE         ROLLBACK        SELECT          START    

我知道这与终端处理换行符的方式有关。有没有办法抑制此警告消息?

1 个答案:

答案 0 :(得分:1)

这不是错误信息。这是因为粘贴时存在水平制表符(\t\09)。这些选项卡会被解释,您将获得自动完成的命令。您可以使用查询缓冲区\e来粘贴&执行或删除代码中的 Tab