FeatureFuel
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

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests