为什么不应该在 PostgreSQL 数据库 "postgres" 中安装 PostGIS?

Why shouldn't PostGIS be installed in the PostgreSQL database "postgres"?

PostGIS installation documentation 显示:

PostGIS is an optional extension that must be enabled in each database you want to use it in before you can use it. Installing the software is just the first step. DO NOT INSTALL it in the database called postgres.

我们 运行 Docker 中的 PostgreSQL 只需要一个数据库,所以我们一直在使用默认数据库 postgres。我的第一个想法是在那里安装 PostGIS,但文档似乎很清楚我们不应该那样做。

PostGIS 不安装在默认数据库中是否有原因,或者这个说明是为了防止人们在 postgres 数据库中意外安装 PostGIS,而他们的数据在 foobar数据库?

谢谢!

将 PostGIS 安装到 postgres 数据库中没有危险。注释只是为了让用户不要像您怀疑的那样混淆自己。