Bonjour,

après avoir installé posGIS comme indiqué dans le README du package :
--Creating a template postgis database or new postgis database --
1) Copy the contents of this folder into C:\Program Files\PostgreSQL\8.3 or where you have installed (
(if you already have proj, geos, you can get away with just copying the lib\postgis-1.4.dll (and share\contrib\postgis-1.4) files if you want
2) Edit the makepostgis.bat and run it.
3) Now you can connect via pgAdmin III and create a new postgis 1.4 database and set template to template_postgis14
Phase 2 après édition comme ceci du fichier makepostgis.bat :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
set PGPORT=5432
set PGHOST=localhost
set PGUSER=postgres
set PGPASSWORD=thx1138
set THEDB=template_postgis14
set PGBIN=C:\Program Files\PostgreSQL\8.3\bin\
"%PGBIN%\psql"  -c "CREATE DATABASE %THEDB%"
"%PGBIN%\psql"  -d "%THEDB%" -c "CREATE LANGUAGE plpgsql"
"%PGBIN%\psql"  -d "%THEDB%" -f 
 
"share\contrib\postgis-1.4\postgis.sql"
"%PGBIN%\psql"  -d "%THEDB%" -f 
 
"share\contrib\postgis-1.4\spatial_ref_sys.sql"
"%PGBIN%\psql"  -d "%THEDB%" -f 
 
"share\contrib\postgis-1.4\postgis_comments.sql"
 
REM Uncomment the below line if this is a template database
REM "%PGBIN%\psql" -d "%THEDB%" -c "UPDATE pg_database SET 
 
datistemplate = true WHERE datname = '%THEDB%';GRANT ALL ON 
 
geometry_columns TO PUBLIC; GRANT ALL ON spatial_ref_sys TO 
 
PUBLIC"
 
 
pause
Le lancement me renvoi les éléments suivants :

C:\Program Files\PostgreSQL\8.3>set PGPORT=5432

C:\Program Files\PostgreSQL\8.3>set PGHOST=localhost

C:\Program Files\PostgreSQL\8.3>set PGUSER=postgres

C:\Program Files\PostgreSQL\8.3>set PGPASSWORD=thx1138

C:\Program Files\PostgreSQL\8.3>set THEDB=template_postgis14

C:\Program Files\PostgreSQL\8.3>set PGBIN=C:\Program Files\PostgreSQL\8.3\bin\

C:\Program Files\PostgreSQL\8.3>"C:\Program Files\PostgreSQL\8.3\bin\\psql" -c
"CREATE DATABASE template_postgis14"
psql: FATAL: authentification par mot de passe échouée pour l'utilisateur « po
stgres »

C:\Program Files\PostgreSQL\8.3>"C:\Program Files\PostgreSQL\8.3\bin\\psql" -d
"template_postgis14" -c "CREATE LANGUAGE plpgsql"
psql: FATAL: authentification par mot de passe échouée pour l'utilisateur « po
stgres »

C:\Program Files\PostgreSQL\8.3>"C:\Program Files\PostgreSQL\8.3\bin\\psql" -d
"template_postgis14" -f "share\contrib\postgis-1.4\postgis.sql"
psql: FATAL: authentification par mot de passe échouée pour l'utilisateur « po
stgres »

C:\Program Files\PostgreSQL\8.3>"C:\Program Files\PostgreSQL\8.3\bin\\psql" -d
"template_postgis14" -f "share\contrib\postgis-1.4\spatial_ref_sys.sql"
psql: FATAL: authentification par mot de passe échouée pour l'utilisateur « po
stgres »

C:\Program Files\PostgreSQL\8.3>"C:\Program Files\PostgreSQL\8.3\bin\\psql" -d
"template_postgis14" -f "share\contrib\postgis-1.4\postgis_comments.sql"
psql: FATAL: authentification par mot de passe échouée pour l'utilisateur « po
stgres »

C:\Program Files\PostgreSQL\8.3>REM Uncomment the below line if this is a templa
te database

C:\Program Files\PostgreSQL\8.3>"C:\Program Files\PostgreSQL\8.3\bin\\psql" -d "
template_postgis14" -c "UPDATE pg_database SET datistemplate = true WHERE datnam
e = 'template_postgis14';GRANT ALL ON geometry_columns TO PUBLIC; GRANT ALL ON s
patial_ref_sys TO PUBLIC"
psql: FATAL: authentification par mot de passe échouée pour l'utilisateur « po
stgres »

C:\Program Files\PostgreSQL\8.3>pause
Appuyez sur une touche pour continuer...
Or le mot de passe pour l'utilisateur postgres est bien thx1138 (rechangé plusieurs fois dans l'interface pgAdmin III)

Je précise que je suis sous PostgreSQL 8.3 (et que j'ai téléchargé la version http://postgis.org/download/windows/...ries-1.4.1.zip
de posGIS à cette page : http://postgis.org/download/windows/

A +