zihaoAK47 commented on code in PR #29610:
URL: https://github.com/apache/shardingsphere/pull/29610#discussion_r1438974232


##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/PLSQL.g4:
##########
@@ -280,9 +284,37 @@ autonomousTransPragma
     ;
 
 dmlEventClause
-    : dmlEventElement (OR dmlEventElement)* ON viewName
+    : (dmlEventElement (OR dmlEventElement)* ON viewName)
+    | (nonDmlEventElement (OR nonDmlEventElement)* ON (DATABASE | (schemaName 
DOT_)? SCHEMA))
     ;
 
 dmlEventElement
     : (DELETE | INSERT | UPDATE) (OF LP_ columnName (COMMA_ columnName)* RP_)?
     ;
+
+nonDmlEventElement
+    : ALTER

Review Comment:
   ```
   CREATE TRIGGER log_errors
     AFTER SERVERERROR ON DATABASE
     BEGIN
       IF (IS_SERVERERROR (1017)) THEN
         NULL;  -- (substitute code that processes logon error)
       ELSE
         NULL;  -- (substitute code that logs error code)
       END IF;
     END;
   ```
   
   Thank you for providing the document reference. It seems that some parts of 
SQL should be handled by the `system_trigger` syntax parse.
   
![2024-01-01_14-29](https://github.com/apache/shardingsphere/assets/106047330/a8653025-47f6-4386-ac28-a8fb67a2bf87)
   Ref: 
https://docs.oracle.com/en/database/oracle/oracle-database/19/lnpls/CREATE-TRIGGER-statement.html#GUID-AF9E33F1-64D1-4382-A6A4-EC33C36F237B__BABHEFGE
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to