Skip to content

Instantly share code, notes, and snippets.

@diyfr
Created June 10, 2020 06:58
Show Gist options
  • Save diyfr/6147ce2ab24c3032f3da4834a986a1ec to your computer and use it in GitHub Desktop.
Save diyfr/6147ce2ab24c3032f3da4834a986a1ec to your computer and use it in GitHub Desktop.
Initialiation DB Postgresql sous Windows
@ECHO ON
REM The script sets environment variables helpful for PostgreSQL
@SET PATH=E:\pgsql\bin";%PATH%
@SET PGDATA=E:\psql\data
@SET PGDATABASE=postgres
@SET PGUSER=postgres
@SET PGPORT=5439
@SET PGLOCALEDIR=E:\pgsql\share\locale
REM -- LA LIGNE SUIVANTE EST A COMMENTER APR7S AVOIR ETE LANCEE UNE PREMIERE FOIS
"E:\pgsql\bin\initdb" -U postgres -A trust --encoding UTF8 --locale fr_FR
REM
"E:\pgsql\bin\pg_ctl" -D "E:\psql\data" -l logfile start
ECHO "Click enter to stop"
pause
"E:\pgsql\bin\pg_ctl" -D "E:\psql\data" stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment