1

我有一个名为 Postgres 的数据库db_1和一个模式s1

(使用 PgAdmin)

  1. 然后我安装了postgispostgis_topology.
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology;

在 下s1,我可以看到 18 种类型,包括geography, geometry...等

  1. search_path然后我更新参数s1, s2, public
  2. 然后我创建了另一个模式s2,但这次s2没有type

  3. 在 Spring 上运行我的 flyway sql,

Caused by: org.postgresql.util.PSQLException: ERROR: type "geography" does not exist

4

1 回答 1

1

原来这不是关于how to install,而是如何connect

我正在使用 Spring 连接到 pgsql,例如,我正在连接到模式s1并且扩展安装在postgis.

当我将连接字符串设置为以下内容时,它可以工作:

?currentSchema=s1,postgis

于 2020-03-23T08:28:02.177 回答