2 ms·
the data is stored as JSONB so that it can be used generically across all tables and adapt to schema changes
by kiwicopple 3y ago
the data is stored as JSONB so that it can be used generically across all tables and adapt to schema changes
- refset 3y agoIt's definitely a reasonable trade-off given the circumstances. Do you know whether Supabase teams who use this extension simply avoid using any non-JSON Postgres types? Or do they lean on workarounds (e.g. JSON-LD encoding)?
- kiwicopple 3y ago> avoid using any non-JSON Postgres types i'm not sure I follow - why would they avoid using non-JSON types? more generally however: I don't have a lot of insight into the usage/feedback for this extension, but I can ask the team
- refset 3y agoThe issue is the complexity of figuring out appropriate JSON-compatible serializations and getting the implementation correct for every single column in use. A simple example would be round-tripping the Postgres money type using salary::numeric and later (user_data->>'salary')::money A much more complex example would be representing a numrange where you have to preserve two bounds and their respective inclusivity/exclusivity, in JSON.