The Metasploit Framework provides PostgreSQL database support that saves data gleaned from Metasploit modules such as scan data, exploit results, and loot.
To use the database:
msf > db_status
https://www.offsec.com/metasploit-unleashed/using-databases/