The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Update docs for pg-safeupdate (#23177)
Chris Gwilliams65efaf3118f1
diff --git a/apps/docs/content/guides/database/extensions/pg-safeupdate.mdx b/apps/docs/content/guides/database/extensions/pg-safeupdate.mdxindex faf7ee4dc67..c071df2b88a 100644--- a/apps/docs/content/guides/database/extensions/pg-safeupdate.mdx+++ b/apps/docs/content/guides/database/extensions/pg-safeupdate.mdx@@ -10,11 +10,12 @@ The `pg-safeupdate` extension is a useful tool for protecting data integrity and## Enable the extension-`pg-safeupdate` can be enabled on a per connection basis:+`pg-safeupdate` can be enabled on a role basis (where `anon` is the role we want to modify in this example):{/* prettier-ignore */}```sql-load 'safeupdate';+GRANT SET ON PARAMETER session_preload_libraries TO anon;+ALTER ROLE anon SET session_preload_libraries = 'safeupdate';```or for all connections:@@ -30,8 +31,6 @@ Let's take a look at an example to see how pg-safeupdate works. Suppose we have{/* prettier-ignore */}```sql-load 'safeupdate';-update employees set date_of_birth = '1987-01-28';```@@ -52,3 +51,4 @@ update employees set date_of_birth = '1987-01-28' where id = 12345;## Resources- Official [pg-safeupdate documentation](https://github.com/eradman/pg-safeupdate)+- Using [pg-safeupdate with PostgREST](https://postgrest.org/en/v12/integrations/pg-safeupdate.html)