I have a Postgres database that stores all of the information collected by our system and then a schema called playback that contains a small portion of the tables contained in the public schema. This playback schema is created using an automated script that is given the few needed views/tables in the schema and then it finds all of the tables that are depended on and creates them in the schema. (This answer shows how I retrieve the dependencies)
Some of these tables are currently auto-populated using rules and this means that there is an entry in the pg_depends table that can be queried. We are currently converting some of these rules to triggers that call functions, because when large chunks of the data are copied into the playback schema the currval('some_sequence') doesn't work properly. (This answer also suggested that this is the proper way to do it)
Unfortunately, this means that there is no longer an entry in pg_depends and the automated script that creates the schema is leaving out some tables. Is there a way for me to retrieve similar dependency information from the functions/triggers? Or is there a better way to do this in general?