Originally Posted by isaac_cm
but why only for developing, is there a problem to use them in customers pc ?
Well that was the use case for me
For a production environment with a dedicated Postgres server you will definitely want to have the service installation in order to make sure Postgres is always up and running.
And the startup through a batch file has the disadvantage that you'll have a console window open which is also not ideal for a production environment.
I have attached the batch files.
They assume that the ZIP distribution is unzipped into the folder where the files are located into a sub-directory called "server". The data directory will be created in the same folder
So the directory will be:
(unzipped binary archive)
The bare minimum to be extracted from the ZIP archive are the directories bin, lib and share
The other stuff (e.g pgAdmin) is optional and not required to run the server.
The batch file initialize.cmd is also adjusting some of the more conservative parameters in the postgresql.conf file.
For this it uses a tool called "Swiss File Knife" to replace the default values. You need to either comment those lines, or download sfk.exe from here.
If you want to run Postgres on a different port, you can either supply the parameter in the commandline for initdb (initialize.cmd, line 24) or extend the section that changes the postgresql.conf file to replace the default port with your desired one.