Fix: 修复 PostgreSQL 默认权限语句诊断误报
This commit is contained in:
2 files changed
+23
No files matched your search
@@ -44,6 +44,19 @@ fn extracts_mysql_single_quoted_table_references() {
|
||||
assert_eq!(analysis.tables[0].schema, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn postgres_default_privileges_statements_do_not_raise_syntax_errors() {
|
||||
let sql = "\
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE,TRUNCATE,REFERENCES,TRIGGER ON TABLES TO app_user;";
|
||||
|
||||
let analysis = analyze_sql_references(sql, Some("postgres"))
|
||||
.unwrap_or_else(|error| panic!("PostgreSQL ALTER DEFAULT PRIVILEGES should analyze: {error}"));
|
||||
|
||||
assert!(analysis.tables.is_empty());
|
||||
assert!(analysis.columns.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn extracts_unqualified_order_by_columns_for_sqlserver_queries() {
|
||||
let analysis =
|
||||
|
||||
Reference in new issue
Block a user