If you only need a static snap shot of the database then from https://<site>/admin/backups download a backup. It should be a *.tar.gz file and when uncompressed will be a *.sql file. Create a PostgreSQL database on another machine, which could even be your laptop, and then import the *.sql file.
Now you should be able to access the data all you want with any means that can connect to a PostgreSQL database.
I use the above but access the Discourse database in PostgreSQL via ODBC.
HTH