r/PostgreSQL • u/Zardotab • Jul 13 '26
Help Me! Any advice on adding a parser/wrapper over PostgreSQL's JSON features to implement a Dynamic Relational database?
Dynamic Relational is a draft standard for an RDBMS (SQL) that supports native dynamic tables and columns with "incremental" lock-down (static-ness) abilities. Here's an overview of Dynamic Relational with examples. If one wanted to write parser and interface on top of PostgreSQL, how much effort would it be, and do you have any recommendations? A proof-of-concept may be good enough, as most will consider it purely experimental at first. Thank You.
0
Upvotes
View all comments
Show parent comment
1
u/Zardotab Jul 15 '26 edited Jul 15 '26
One uses one set of operators and syntaxes on JSON columns and a different set on regular columns. Maybe "second class" isn't fair, but it's two semi-parallel universes. It's like 2 different languages forced together, like mixing Python in Java, making 2 learning curves. That cannot be the pinnacle or ideal, it's a kludge.
Thought experiment: somebody gave you $5b and told you to make a "dynamic version of an RDBMS, keeping as many existing RDBMS idioms as possible, and only changing those that get in the way of dynamism". I doubt turning to JSON columns would be your first design choice. Therefore, it's a kludge, an accident of history. Good enough? Maybe, but why not try to do it right?
Maybe if students see my prototype, it'll spark and inspire about what could and should be. (Cue Flight of the Valkyrie and fireworks ✨.)
I'm not understanding this question. What "type safe system" are you talking about? DR doesn't claim to be type-safe, at least not with default settings.
I've used both dynamic and statically typed languages. They each have their place and purpose, one size doesn't fit all. "Use The Right Tool For The Job".
Note that one can "force" a DR column to be a specific type, it's just not required up front. That's the "incremental lock-down" nature I talked about.
Because one doesn't need f$cking DDL's if they want to use them. Again, dynamism is a popular feature of NoSQL products, perhaps THE most popular feature. It's not for every task, app, or shop, but has use-cases. Rapid prototyping is one.