Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install PostgreSQL 9.0.4 on Windows silently

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_plpgsql invalid please see the help.

Which option should be passed for PostgreSQL 9.0.4 to install it properly from the command line?

like image 423
jenitshah Avatar asked Apr 02 '26 23:04

jenitshah


1 Answers

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)
like image 155
Grzegorz Szpetkowski Avatar answered Apr 08 '26 14:04

Grzegorz Szpetkowski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!