首页 > 解决方案 > HowTo:指定在 postgresql uri 中指向哪个模式

问题描述

所以,我试图指向一个 Heroku PostgreSQL 数据库,因为没有指定模式,所以只能将我指向没有数据可访问的公共:

postgres://user:password@host:port/database

如何在 uri 上指定要指向的架构?

标签: postgresqlheroku

解决方案


利用currentSchema

jdbc:postgresql://{host}:5432/{database_name}?currentSchema={scehma_name}

推荐阅读