Skip to content

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

Apply suggestions from code review

Copple6d546471d39d
diff --git a/apps/docs/pages/guides/database/postgres/row-level-security.mdx b/apps/docs/pages/guides/database/postgres/row-level-security.mdx
index 983b0d33de3..175d03725a0 100644
--- a/apps/docs/pages/guides/database/postgres/row-level-security.mdx
+++ b/apps/docs/pages/guides/database/postgres/row-level-security.mdx
@@ -54,7 +54,7 @@ Supabase provides some [helpers](/docs/guides/auth/row-level-security#helper-fun
### SELECT Policies
-You can specify select policies with the `using` command.
+You can specify select policies with the `using` clause.
Let's say you have a table called `profiles` in the public schema and you want enable read access to everyone.
@@ -76,7 +76,7 @@ to anon -- the Postgres Role (recommended)
using ( true ); -- the actual Policy
```
-Alternatively if you only wanted users to be able to see their own profiles:
+Alternatively, if you only wanted users to be able to see their own profiles:
```sql
create policy "Profiles are viewable by everyone."
@@ -86,7 +86,7 @@ for select using ( auth.uid() = user_id );
### INSERT Policies
-You can specify select policies with the `with check` command.
+You can specify select policies with the `with check` clause.
Let's say you have a table called `profiles` in the public schema and you only want users to be able to create a profile for themselves. In that case, we want to check their User ID matches the value that they are trying to insert:
@@ -110,7 +110,7 @@ using ( auth.id() = user_id ); -- the actual Policy
### UPDATE Policies
-You can specify select policies with the `using` command.
+You can specify select policies with the `using` clause.
Let's say you have a table called `profiles` in the public schema and you only want users to be able to update their own profile:
@@ -134,7 +134,7 @@ using ( auth.id() = user_id ); -- the actual Policy
### DELETE Policies
-You can specify select policies with the `using` command.
+You can specify select policies with the `using` clause.
Let's say you have a table called `profiles` in the public schema and you only want users to be able to delete their own profile:
@@ -168,7 +168,7 @@ This can be useful for system-level access. You should _never_ share login crede
## RLS Performance Recommendations
-Every authorization system has an impact on Performance. While Row Level Security is powerful, the performance impact is important to keep in mind. This is especially true for queries that scan every row in a table - like many `select` operations, including those using limit, offset, and ordering.
+Every authorization system has an impact on performance. While row level security is powerful, the performance impact is important to keep in mind. This is especially true for queries that scan every row in a table - like many `select` operations, including those using limit, offset, and ordering.
Based on a series of [tests](https://github.com/GaryAustin1/RLS-Performance), we have a few recommendations for RLS: