Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List policies of tables #2803

Open
smaldd14 opened this issue Oct 25, 2024 · 0 comments
Open

List policies of tables #2803

smaldd14 opened this issue Oct 25, 2024 · 0 comments

Comments

@smaldd14
Copy link

Is your feature request related to a problem? Please describe.
It would be super helpful to add a supabase cli command to list policies for all your tables, or by table.

Would be especially useful when promoting AI models to give them more context on how you db and schema is set up.

Describe the solution you'd like
supabase policies list tableA returns a list of your policies on the table

Describe alternatives you've considered
You could use SQL to get it. Something like:

SELECT schemaname, tablename, policyname, roles, cmd, qual 
FROM pg_policies 
WHERE schemaname = 'public' and tablename = 'tableA'
ORDER BY tablename, policyname;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant