News for hackers. Stuff that matters.
Re:The challenges of supporting foreign key constraints by padre24 on Tuesday December 05, 2023 @01:14PM (#38534758)
This was a great read, thanks.

Are there any plans to support recursive CTEs? What are the technical challenges there?

Re:The challenges of supporting foreign key constraints by guptamanan100 on Tuesday December 05, 2023 @01:22PM (#38534874)
Thank you for the compliment!

We recently started adding support for CTEs in Vitess! You can check out https://github.com/vitessio/vitess/pull/14321 if you want to see some technical details of the implementation.

For now, we have added preliminary support by converting them to derived tables internally, but we believe that we need to make CTEs first-class citizens themselves of query planning, specifically because recursive CTEs are very hard to model as derived tables. Once we make that change, we can look towards supporting recursive CTEs.

This however will take some time, but then, all good things do!

Re:The challenges of supporting foreign key constraints by padre24 on Tuesday December 05, 2023 @02:03PM (#38535416)
Awesome news! We work with hierarchical data so it was a non starter for us.
Re:The challenges of supporting foreign key constraints by guptamanan100 on Tuesday December 05, 2023 @02:27PM (#38535732)
Oh, I see, that's unfortunate! Hopefully, we can remedy that though as soon as possible.
Re:The challenges of supporting foreign key constraints by derekperkins on Sunday December 10, 2023 @12:22AM (#38589346)
If you don't need recursive CTEs on sharded databases, they'll work today. We're actively using them