I have a postgres database with a complex schema with many references.
Simple example of schema:
Deployments(id, name) Releases(deployment-id, name, id) VMs(id, deployment-id) VmInfo(vm-id, info)
I would like to extract from the db all details about Deployments with a name that starts with 'FOO-*'
Is there a easy way/tool to export all data related to these records without manually crafting a query to connect all keys? I am looking to something similar to the 'ON DELETE CASCADE' to follow all references for me.
In this example I would like to see all Deployments that follow my query, with all related releases, VMs AND VmInfo.