From 21def568a407ac0946974b13edc69039ba139613 Mon Sep 17 00:00:00 2001 From: Andrey Nikolaev Date: Sun, 26 Jan 2025 08:35:45 -0800 Subject: [PATCH] fix: fix regex for SQL-like operators with proper precedence handling --- crates/lib-dialects/src/postgres.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lib-dialects/src/postgres.rs b/crates/lib-dialects/src/postgres.rs index 281bdc247..6d7ff7f04 100644 --- a/crates/lib-dialects/src/postgres.rs +++ b/crates/lib-dialects/src/postgres.rs @@ -60,7 +60,7 @@ pub fn raw_dialect() -> Dialect { ), Matcher::regex( "trgm_operator", - r#"%|<%|%>|<<%|%>>|<->|<<->|<->>|<<<->|<->>>"#, + r#"(<<<->|<->>>|<<->|<->>|<->|<<%|%>>|%>|<%|%)"#, SyntaxKind::LikeOperator ), Matcher::string(