jdbc_url: jdbc:postgresql://localhost:5432/databasename
showing all databases:
SELECT datname FROM pg_database WHERE datistemplate = false;
This lists tables in the current database
SELECT table_schema,table_name FROM information_schema.tables ORDER BY table_schema,table_name;
psql commands
\list
or \l
: list all databases
\dt
: list all tables in the current database
To switch databases: \connect database_name
Links:
https://dba.stackexchange.com/questions/1285/how-do-i-list-all-databases-and-tables-using-psql