The installer will override any environment variables, as it executes with its own environment in Windows Installer. To change a directory, use the installer features for it. See the FAQ question 3.6.
I did that, and here is FAQ 3.6:
I changed the directory but PostgreSQL was still installed in the default directory
Make sure you changed the directory of the root feature. The PostgreSQL installer permits changing the directory of each individual feature. If you change the root feature ("PostgreSQL"), any subfeatures (such as "Database Server") will automatically inherit this value as default, but if you only change a subfeature the rest of the installation will remain in the default location.
I can find only one dialog to change the directory, that is where the following ist offered on my system:
"C:\Programme\PostgreSQL\8.0.0-rc5\" [browse]
But FAQ 3.6 suggests that there are more dialogs to change subdirectories too.
I tried without success:
g:\pgsql\PostgreSQL\8.0.0-rc5\ and g:\pgsql\"
which did not work.
Finally, after reading again FAQ 3.6 I tried
'g:\pgsql\8.0.0-rc5', which worked fine. So the version-part, which here is '8.0.0-rc5', must be the last part path.
By this there will be an new directory for every release, which seems reasonable.
I think there should be given an example like in FAQ 3.6 or even better in the installation dialog.
Something like:
If 'C:\Programme\PostgreSQL\8.0.0-rc5\' is given here as default
and you would like to install in d:\pgsql, then please
change to 'd:\pgsql\8.0.0-rc5\'
Regards Christoph Becker
Magnus Hagander schrieb:
I wanted to install rc4 on Windows XP in g:\pgsql and selected this in the Installprocess.
PGDATA was already set to this directory.
However, PostgeSQL as well as the data-directory were installed at
C:\Programme\PostgreSQL\8.0.0-rc4
resp.
C:\Programme\PostgreSQL\8.0.0-rc4\data
Initdb and pg_ctl start as user postgres did find PGDATA (which I set as universal system variable)
The installer will override any environment variables, as it executes with its own environment in Windows Installer. To change a directory, use the installer features for it. See the FAQ question 3.6.
//Magnus
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend