Clone schema with RLS and Realtime
I want to create a sql function that clones a schema. My starting point is this script i found here: https://wiki.postgresql.org/wiki/Clone_schema
It works fine but doesn't copy RLS and if a table has activated Realtime. I know the necessary sql statements to enable RLS and Realtime but can't figure it out to check whether a the table of the base schema has active realtime and wihch RLS policies are active.
1 Reply
What I need is a query that can read the realtime status of a table
Okay, I can get all tables that have Realtime enabled with something like this "SELECT *
FROM pg_publication_tables
WHERE pubname = 'supabase_realtime'
and schemaname = 'public';"