Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(studio): backslash escaping in linter query (#22829)

Bobbie Soedirgo8ad3a33104b7
diff --git a/apps/studio/data/lint/lint-query.ts b/apps/studio/data/lint/lint-query.ts
index 2f8e54f6eaf..1a62dd28793 100644
--- a/apps/studio/data/lint/lint-query.ts
+++ b/apps/studio/data/lint/lint-query.ts
@@ -240,16 +240,16 @@ where
and (
(
-- Example: auth.uid()
- qual ~ '(auth)\.(uid|jwt|role|email)\(\)'
+ qual ~ '(auth)\\.(uid|jwt|role|email)\\(\\)'
-- Example: select auth.uid()
- and lower(qual) !~ 'select\s+(auth)\.(uid|jwt|role|email)\(\)'
+ and lower(qual) !~ 'select\\s+(auth)\\.(uid|jwt|role|email)\\(\\)'
)
or
(
-- Example: auth.uid()
- with_check ~ '(auth)\.(uid|jwt|role|email)\(\)'
+ with_check ~ '(auth)\\.(uid|jwt|role|email)\\(\\)'
-- Example: select auth.uid()
- and lower(with_check) !~ 'select\s+(auth)\.(uid|jwt|role|email)\(\)'
+ and lower(with_check) !~ 'select\\s+(auth)\\.(uid|jwt|role|email)\\(\\)'
)
))
union all