Home:ALL Converter>PSQL_HISTORY ignored by PyCharm

PSQL_HISTORY ignored by PyCharm

Ask Time:2020-10-11T17:59:14         Author:Aliaksandr Adzinets

Json Formatter

I have a Django project connecting to a PostgreSQL database which I develop in PyCharm, and I want to enable PostgreSQL history logging.

There is PSQL_HISTORY env variable set to /home/user/apps/postgres/logs/.pycharm_log, but when I start the project in PyCharm and update some data via the Django Admin (which certainly hits the database) -- nothing gets logged and the file is not created at all.

Is there a way to make PyCharm and PSQL_HISTORY work together as I expected?

Author:Aliaksandr Adzinets,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/64302750/psql-history-ignored-by-pycharm
yy