3 ms·
We are using this kind of CTEs for handling BoM trees. Everyone thinks we habe some complicated software that generates this tree. Well, we just maintain the c
by ccozan 8y ago
We are using this kind of CTEs for handling BoM trees.
Everyone thinks we habe some complicated software that generates this tree. Well, we just maintain the correct parent-child relation. Rest is trivial, with recursive CTE.
- esaym 8y ago>BoM trees Bill of material trees? Could you maybe elaborate more?
- ccozan 8y agoYes, Bill of Material. On our business we have sub-sub...-sub components, so we need to keep it like a tree, but manage it in a RMDBS.
- dliff 8y agoVery cool, this was actually my first real-world use case for Postgres CTE's. (BOM part of homemade ERP software I built for my last company). Worked great!