The idea of defining and executing a recursive function inside my production database seems a little scary. Might want to build in your own recursion limits to that one. Is there a way to set execution timeouts or something?
(https://www.postgresql.org/docs/14/runtime-config-resource.h...)