1

I am trying to select a non-default PostgreSQL schema when using a reactive datasource with Quarkus. I tried a syntax similar to the working "regular", non-reactive datasource using ?currentSchema:

quarkus.datasource.url=jdbc:postgresql://host/database?currentSchema=int

like follows:

quarkus.datasource.reactive.url=postgresql://host/database?currentSchema=int

However, it does not have any effect, the default schema is always used.

How can I achieve selecting a PostgreSQL schema for a reactive datasource?

DaHoC
  • 314
  • 1
  • 4
  • 14

1 Answers1

1

I have the same problem. As a workaround I helped myself by changing the search_path for the user:

ALTER ROLE readonly IN DATABASE "quarkus"
    SET search_path TO newSchema;
  • I created an altogether different database instead of just using a different schema within the same database, as this is somewhat cleaner to my use-case and has better IDE tooling support anyway – DaHoC May 08 '21 at 08:45