I'm running PostgreSQL in Windows. I have a vanilla installation with a single admin Windows user account, which I've used to install PostgreSQL and pgAdmin III. Using pgAdmin III I created a database owned by the postgresql account.
I have an external application which needs to access the database. I have provided that application with the postgresql username and password.
If I do not connect to the database via pgAdmin III (a red X appears on the database), the external application cannot connect to the database. As soon as I do connect to the database via pgAdmin III, the external application can connect. This is a problem because both programs (PostgreSQL and the application) are running as services and need to be able to start up and connect automatically when the server is restarted (both services do start correctly when the server is restarted).
In desperation I even saved the password when connecting to the database via pgAdmin III, hoping that the connection would persist between reboots, but it didn't.
How can I set the database up to be permanently available for logging in with the correct username and password? Preferably without saving the password in plaintext.