We are mapping out a large database that has NO documentation.

And thus we are making our own.

I know I can use a SELECT * FROM pg_database or SELECT * FROM information_schema.columns WHERE table_name ='table';

But how does one recurse so one can go down the whole database and get every table (and if possible information of forms, reports, queries, and modules.)