© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
21 replies
Brennan

Search path or grant lockdown mishap

As someone who doesn't claim to be an expert in SQL, I was trying to tighten my security to my entire DB, adding search_paths to the functions and revoking permissions to general users on public. I'm including a log of all the SQL changes I made, the initial changes were made to tighten security and they did that too well: now users who are authenticated and supposed to / previously get missing relations errors when accessing tables (i.e. the tables cannot be queried). It seems the query throwing this error is within the get_user_role function which is used everywhere to determine permissions. I would be happy to share any details necessary! https://hastebin.com/share/vapacetuqe.sql Thanks!
Hastebin
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Lockdown database
SupabaseSSupabase / help-and-questions
4mo ago
Default `USER postgres search_path`
SupabaseSSupabase / help-and-questions
4y ago
Auth grant password spam
SupabaseSSupabase / help-and-questions
5mo ago
should i use supabase text search or algolia?
SupabaseSSupabase / help-and-questions
4y ago