如何 select 在 Quarkus 中使用反应式数据源的 Postgres 模式
How to select Postgres schema with reactive datasource in Quarkus
我正在尝试 select 在将响应式数据源与 Quarkus 一起使用时使用非默认 PostgreSQL 模式。
我使用 ?currentSchema
:
尝试了类似于工作的“常规”非反应性数据源的语法
quarkus.datasource.url=jdbc:postgresql://host/database?currentSchema=int
喜欢如下:
quarkus.datasource.reactive.url=postgresql://host/database?currentSchema=int
但是,它没有任何作用,始终使用默认架构。
如何实现 select 反应式数据源的 PostgreSQL 模式?
我也遇到了同样的问题。作为一种解决方法,我通过为用户更改 search_path 来帮助自己:
ALTER ROLE readonly IN DATABASE "quarkus"
SET search_path TO newSchema;
我正在尝试 select 在将响应式数据源与 Quarkus 一起使用时使用非默认 PostgreSQL 模式。
我使用 ?currentSchema
:
quarkus.datasource.url=jdbc:postgresql://host/database?currentSchema=int
喜欢如下:
quarkus.datasource.reactive.url=postgresql://host/database?currentSchema=int
但是,它没有任何作用,始终使用默认架构。
如何实现 select 反应式数据源的 PostgreSQL 模式?
我也遇到了同样的问题。作为一种解决方法,我通过为用户更改 search_path 来帮助自己:
ALTER ROLE readonly IN DATABASE "quarkus"
SET search_path TO newSchema;