PostgreSQL - How to Show the data directory?
How to see where PostgreSQL stores the database?
You can execute this query to show your database directories:
SELECT
setting
FROM
pg_settings
WHERE
name = 'data_directory';
or this query:
SHOW data_directory;
Note that you have to be a superuser to see.
Need a good GUI tool for PostgreSQL? Check out TablePlus. It’s native, beautiful, and available for free.
Not on Mac? Download TablePlus for Windows.
On Linux? Download TablePlus for Linux
Need a quick edit on the go? Download TablePlus for iOS.