gpt4 book ai didi

postgresql - 在 Windows 上静默安装 PostgreSQL 9.0.4

转载 作者:行者123 更新时间:2023-11-29 11:57:42 27 4
gpt4 key购买 nike

我之前通过 inno 设置文件使用以下命令安装了 PostgreSQL 8.4。

postgresql.exe --mode unattended --unattendedmodeui minimal --superpassword admin@123 --prefix "c:\iview\postgres" --datadir "c:\iview\postgres\data" --install_plpgsql 1 --create_shortcuts 0 '

现在,我想通过上面的命令安装 OostgreSQL 9.0.4,但它显示错误:

option datadir,install_plpgsql invalid please see the help.

应该为 PostgreSQL 9.0.4 传递哪个选项才能从命令行正确安装它?

最佳答案

检查安装程序的 --help 开关以获取所有可用选项,例如:

postgresql-9.0.4-1-windows_x64.exe --help

正如我所检查的那样,在早期版本 (postgresql-8.4.8-1-windows.exe) 中没有可用的 --install_plpgsql 开关:

 --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)

关于postgresql - 在 Windows 上静默安装 PostgreSQL 9.0.4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7076867/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com