How to access from Windows a Discourse's PostgreSQL database installed to WSL?

How to access a PostgreSQL database in a VMware Workstation guest from a Windows host?