I am looking for a tool or open-source library which can use table dependencies to create insert scripts for PostgreSQL database.
I am working on specific requirements to clone data related to a particular entity and all its dependent tables. My idea is to generate a table dependency using a tree and use this tree to create insert scripts. But, this approach feels like reinventing a wheel.
Are there any tools or libraries that can be used here? I am looking for a more generic approach where I can point to a particular table and generate scripts for copying all the data in its child tables which can also have other foreign key constraints, so the order needs to be maintained.