Title: Persistent "FLUSH PRIVILEGES" error in PostgreSQL session after reinstalling HeidiSQL
Message:
Hello,
I'm experiencing a persistent issue when connecting to a PostgreSQL session in HeidiSQL. Every time I open the session, the following command is automatically executed:
SHOW ALL; FLUSH PRIVILEGES;
This results in the error:
ERROR: syntax error at or near "FLUSH" LINE 1: FLUSH PRIVILEGES ^
As you know, FLUSH PRIVILEGES is a MySQL-specific command and not valid in PostgreSQL.
I’ve already tried the following steps:
Uninstalled HeidiSQL completely
Deleted configuration files from %APPDATA%\HeidiSQL
Removed leftover folders from Program Files
Rebooted the system
Reinstalled HeidiSQL from scratch
Deleted old sessions and created a new PostgreSQL session with no startup script
Despite all this, the FLUSH PRIVILEGES command keeps appearing automatically when I connect to PostgreSQL. I’ve confirmed that no script file is selected in the “Startup script” field under the Advanced tab.
Is there any hidden configuration or default behavior that could be causing this? How can I prevent HeidiSQL from injecting this invalid command into PostgreSQL sessions?
Thanks in advance for your help!


