s5dsn-eqee commented on code in PR #2746:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2746#discussion_r4398542027


##########
src/parser/mod.rs:
##########


Review Comment:
   PostgreSQL DROP FOREIGN TABLE synopsis, DROP FOREIGN TABLE [ IF EXISTS ] 
name [, ...] [ CASCADE | RESTRICT ] (no TEMPORARY, PURGE or ON):
   
   https://www.postgresql.org/docs/current/sql-dropforeigntable.html
   
   
           if object_type == ObjectType::ForeignTable && (temporary || purge || 
table.is_some()) {
                 return parser_err!(
                     "Cannot specify TEMPORARY, PURGE, or ON in DROP FOREIGN 
TABLE",
                     loc
                 );
             }
   
   
   
   and red tests
   
   ```
    #[test]
     fn parse_drop_foreign_table_rejects_modifiers() {
         for sql in [
             "DROP TEMPORARY FOREIGN TABLE ft",
             "DROP FOREIGN TABLE ft PURGE",
             "DROP FOREIGN TABLE ft ON t",
         ] {
             assert!(all_dialects().parse_sql_statements(sql).is_err(), 
"{sql}");
         }
     }
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to