![]() ?%\bin\pg_ctl -D ?%/data -l logfile start REM The script sets environment variables helpful for PGLOCALEDIR=?%\share\locale "%~dp0\bin\pg_ctl" -D "%~dp0/data" -l logfile start REM "%~dp0\bin\initdb" -U postgres -A trust REM The script sets environment variables helpful for PGLOCALEDIR=%~dp0\share\locale The ?% returns the folder path of current directory and %~dp0 returns folder path of script.Īs Tom pointed out the original doesn't handle spaces and only works if you are double-clicking on the batch file. ![]() The assumpution of the script is that its in the root of your unzipped PostgreSQL folder. Clicking enter in the window will shut it down. From then on you can carry the server on USB device if you want and launch as you wish. To initialize the database for the first time, you will want to run the ![]() We chose to run on a non-standard port (5439 so we know its 9.0 server). This is one we were using as part of a self-contained devleopment kit running PostgreSQL 9.0 beta. For first time use, unremark out the (initdb step)īelow is the script that will start a PostgreSQL server and clicking the enter key will shut the service down.Next copy the below batch file into the root of the postgresql folder.You can either copy the postgresql folder (minus the data folder) from an existing PostgreSQL install, or just download the PostgreSQL binaries from PostgreSQL Windows.
0 Comments
Leave a Reply. |