Skip to content

Commit 974ab0c

Browse files
committed
fix: fix regex for SQL-like operators with proper precedence handling
1 parent ae892f4 commit 974ab0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/lib-dialects/src/postgres.rs

+1-1
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)