Skip to content

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

fix: Escape the escape chars so that `auth_rls_initplan` rule works properly (#23176)

Ivan Vasiloveadf3d5353f5
diff --git a/apps/studio/data/lint/lint-query.ts b/apps/studio/data/lint/lint-query.ts
index 938223f4b30..5c290d45e79 100644
--- a/apps/studio/data/lint/lint-query.ts
+++ b/apps/studio/data/lint/lint-query.ts
@@ -221,16 +221,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