I am used to working within pgAdmin, open a SQL script and just type there. I figured out how to run some scripts after each other with a batch file but ran into the problem that I needed UTF-8 without BOM. I fixed that by opening the scripts in notepad++ and saving them in UTF-8 without BOM.
But now whenever I work on a script within pgAdmin and then want to run it from the batch file, I have to do the same routine with notepad++. Isn't there a way to save UTF-8 without BOM in pgAdmin? Or to set the type of the scripts in UTF-8 without BOM that it is the default value and will never change?
In pgAdmin III (pgadmin3
) version 1.14 and later, you can control this with a global setting:
If you already had "Query tool" windows open in pgAdmin, you might have to close them and reopen the scripts in new "Query tool" windows for the change to take effect on subsequent saves.