mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
hides the copy buttons
This commit is contained in:
1 parent
abb68f46e5
commit
6f0c1d3e2b
1 file changed
+4
-4
@@ -59,7 +59,7 @@ An RLS policy is a snippet of SQL filtering which users have the authority to cr
|
||||
|
||||
For example, the following policy would allow users to select their own rows in a todos table:
|
||||
|
||||
```sql
|
||||
```sql hideCopy
|
||||
create policy todo_select_policy
|
||||
on todos for select
|
||||
using ( auth.uid() = user_id );
|
||||
@@ -67,7 +67,7 @@ create policy todo_select_policy
|
||||
|
||||
which is equivalent to adding
|
||||
|
||||
```sql
|
||||
```sql hideCopy
|
||||
select *
|
||||
from todos
|
||||
where auth.uid() = todos.user_id; -- Policy is implicitly added.
|
||||
@@ -115,14 +115,14 @@ To maximize throughput, the query used to evaluate if a row is visible to a subs
|
||||
|
||||
For example:
|
||||
|
||||
```sql
|
||||
```sql hideCopy
|
||||
select exists(select 1 from some_table where id = 806);
|
||||
```
|
||||
|
||||
When more than one subscriber exists, the query is wrapped in a [prepared statement](https://www.postgresql.org/docs/13/sql-prepare.html) to remove the cost of the PostgreSQL
|
||||
query planner on subsequent calls. The query planner time is frequently 2-3x execution time for simple queries, so this immediately multiplies throughput in the most common cases!
|
||||
|
||||
```sql
|
||||
```sql hideCopy
|
||||
"Planning Time: 0.099 ms"
|
||||
"Execution Time: 0.051 ms"
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user