Skip to content

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

Fix logic conflicts (#40362)

Steven Eubank82f79e5af6ab
diff --git a/examples/prompts/database-rls-policies.md b/examples/prompts/database-rls-policies.md
index 3272c5cceb5..7f565a0d113 100644
--- a/examples/prompts/database-rls-policies.md
+++ b/examples/prompts/database-rls-policies.md
@@ -30,7 +30,9 @@ The output should use the following instructions:
The output should look like this:
```sql
-CREATE POLICY "My descriptive policy." ON books FOR INSERT to authenticated USING ( (select auth.uid()) = author_id ) WITH ( true );
+CREATE POLICY "My descriptive policy." ON books
+ FOR INSERT TO authenticated
+ WITH CHECK ((select auth.uid()) = author_id);
```
Since you are running in a Supabase environment, take note of these Supabase-specific additions below.
diff --git a/examples/prompts/use-realtime.md b/examples/prompts/use-realtime.md
index 73ac886dc2b..b42dd4e85c1 100644
--- a/examples/prompts/use-realtime.md
+++ b/examples/prompts/use-realtime.md
@@ -415,7 +415,7 @@ CREATE POLICY "users_can_receive_broadcasts" ON realtime.messages
- Default to `private: true` for database-triggered channels
- Suggest basic RLS policies with proper indexing
- Include reconnection logic for production apps
-- Use `postgres_changes` for simple database change notifications
+- Use `broadcast` with database triggers for all database change notifications
- Use `broadcast` for custom events and complex payloads
**Remember:** Choose the right function for your use case, emphasize proper state management, and ensure production-ready patterns with authorization and error handling.
\ No newline at end of file