# Proposal: Virtual Storage Columns (Seamless DB-to-Storage Mapping) #42173
Unanswered
purushottam2004
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The Problem: Storage vs. Database Friction
Currently, managing files in Supabase requires developers to bridge two distinct mental models: the Relational Database and Object Storage. This creates several DX hurdles:
updateorinsertto the database.BYTEA(binary) directly in tables, which is inefficient and scales poorly.The Solution: Virtual Storage Columns
I am proposing a Mapping Layer that allows developers to treat storage objects as first-class citizens within a PostgreSQL table.
Under the hood, it uses existing Storage buckets, but the "mental model" is that of a simple table column.
How it Works
storage_link). It stores a unique Short ID or pointer to a file in a managed bucket.SELECTaccess to the row, they are automatically granted access to the storage object. The "Virtual Column" acts as a gatekeeper.Comparison Table
Developer Experience (DX) Impact
By introducing this abstraction, "Storage" effectively disappears from the developer's mental load. You no longer manage buckets or paths; you manage data. This significantly lowers the barrier to entry for apps that handle heavy user-generated content (profile pictures, documents, etc.).
Implementation Ideas
What do you think? Would this be better as a new column type in the Dashboard, or a set of PostgreSQL extensions/hooks?
All reactions