FeatureFuel
1

Feature Request: Port storage functions to plpgsql

Source: supabase/supabase#29317 · opened by @purpleKarrot
Functions like signObjectUrl are currently [implemented in typescript]( and have to be called through the REST API:



If I want to display a list of users with their avatars, I have to make two requests:

1. get the list of users from supabase (postgrest).
2. get the signed URL for each avatar from supabase.storage.

Both requests eventually query the same database. It would be nice if there was a way to avoid this roundtrip.

Example: If signObjectUrl was implemented in plpgsql, I would expect being able to use it like this:



Then, requesting a list of users, each with a signed URL for their avatar could be retrieved in a single query:



My recommendation would be to port most (/all?) of the storage functions to plpgsql and reimplement the storage REST API on top of them.

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