74
Environment variables for DB functions
Source: supabase/supabase#12813 · opened by @yngwi
Update: [it's on our roadmap](
---
Hi, I'm currently working through the User Management on React Tutorial and in the [Storage Management]( section code example, the project URL and service role key are shown to be hardcoded into a database function:
I see two problems with this:
1. The values are different for local development environments and the hosted server
2. If used on a local dev server, the values will also become part of migrations and are possibly committed to a code repository
I've had some discussions on the Discord but while some partial solutions have come up, there doesn't seem to be a way to avoid this kind of hardcoding completely. Is this correct or is there another way?
Anyways, my feature request is that it would be very convenient to be able to set environment variables that can be used inside postgres. One alternative could be setting the PGOPTIONS parameter on the postgres docker container startup?
Thank you!
Daniel
---
Hi, I'm currently working through the User Management on React Tutorial and in the [Storage Management]( section code example, the project URL and service role key are shown to be hardcoded into a database function:
I see two problems with this:
1. The values are different for local development environments and the hosted server
2. If used on a local dev server, the values will also become part of migrations and are possibly committed to a code repository
I've had some discussions on the Discord but while some partial solutions have come up, there doesn't seem to be a way to avoid this kind of hardcoding completely. Is this correct or is there another way?
Anyways, my feature request is that it would be very convenient to be able to set environment variables that can be used inside postgres. One alternative could be setting the PGOPTIONS parameter on the postgres docker container startup?
Thank you!
Daniel
No pledges yet. Be the first to back this.
Comments
Similar requests
Add option to `supabase functions deploy` to delete non-local functions
2 votes · 0 comments
DBT Cloud Console
3 votes · 0 comments
Move Away from Using Environment Variables for Secrets
1 vote · 0 comments
Replace Deno Runtime for Edge Functions with Dapr
11 votes · 0 comments
It would be nice to have a jdbc fdw. As the already existing are dead.
1 vote · 0 comments
No comments yet.