© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
•
4y ago
•
1 reply
ak4zh
Get project ref from SQL?
Is project
-ref
-id stored in any table inside the postgresql
?
I want to get the current project
-ref
-id using SQL
.
This is to make a generic SQL query which needs project
-ref
-if
, so I can run same sql in any project
.
EXEUTE function do_something(SELECT project_ref_id FROM some_table)
EXEUTE function do_something(SELECT project_ref_id FROM some_table)
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Get project-ref from the sql level
S
Supabase / help-and-questions
4y ago
SQL snippets - get data from another project
S
Supabase / help-and-questions
4y ago
Invalid project ref
S
Supabase / help-and-questions
4y ago
Get supabase project name using SQL query
S
Supabase / help-and-questions
4y ago