I have previously installed PostgreSQL 8.4 with below command through inno set up file.
postgresql.exe --mode unattended --unattendedmodeui minimal --superpassword admin@123 --prefix "c:\iview\postgres" --datadir "c:\iview\postgres\data" --install_plpgsql 1 --create_shortcuts 0 '
Now, I want to install OostgreSQL 9.0.4 through above command but it shows an error:
option datadir,install_pl开发者_开发百科pgsql invalid please see the help.
Which option should be passed for PostgreSQL 9.0.4 to install it properly from the command line?
Check installer's --help
switch to get all available options, e.g.:
postgresql-9.0.4-1-windows_x64.exe --help
As I checked there is no --install_plpgsql
switch available as in earlier version (postgresql-8.4.8-1-windows.exe
):
--install_plpgsql Install pl/pgsql in template1 database? Default: 1
However if you want --install_plpgsql 1
, then you can just skip that switch, because PL/pgSQL language is installed by default:
SELECT lanname FROM pg_language WHERE lanname LIKE 'plpgsql';
lanname
---------
plpgsql
(1 row)
精彩评论