From embedded SQL - how do I retrieve
1) a list of the tables in the datbase?
2) a list of the columns in each table?
Perhaps #1 is this:
SELECT tablename FROM pg_tables WHERE NOT schemaname = 'pg_catalog';
I'm at a loss for #2
The following doesn't seem very useful:
SELECT * FROM pg_class WHERE relname = 'tablename';