Skip to content

Commit 21def56

Browse files
authored
fix: fix regex for SQL-like operators with proper precedence handling
1 parent 93f0344 commit 21def56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/lib-dialects/src/postgres.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub fn raw_dialect() -> Dialect {
6060
),
6161
Matcher::regex(
6262
"trgm_operator",
63-
r#"%|<%|%>|<<%|%>>|<->|<<->|<->>|<<<->|<->>>"#,
63+
r#"(<<<->|<->>>|<<->|<->>|<->|<<%|%>>|%>|<%|%)"#,
6464
SyntaxKind::LikeOperator
6565
),
6666
Matcher::string(

0 commit comments

Comments
 (0)