Skip to content

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

docs: add rls select notes to delete

Bobbie Soedirgo942b11a79faf
diff --git a/web/spec/supabase.yml b/web/spec/supabase.yml
index a6fd5c51d96..13cc952a018 100644
--- a/web/spec/supabase.yml
+++ b/web/spec/supabase.yml
@@ -705,7 +705,12 @@ pages:
title: 'Delete data: delete()'
$ref: '@supabase/postgrest-js."lib/PostgrestQueryBuilder".PostgrestQueryBuilder.delete'
notes: |
- - `delete()` should always be combined with [Filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to delete.
+ - `delete()` should always be combined with [filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to delete.
+ - If you use `delete()` with filters and you have
+ [RLS](/docs/learn/auth-deep-dive/auth-row-level-security) enabled, only
+ rows visible through `SELECT` policies are deleted. Note that by default
+ no rows are visible, so you need at least one `SELECT`/`ALL` policy that
+ makes the rows visible.
examples:
- name: Delete records
isSpotlight: true