Reputation: 329
Today with the below configuration it is connecting to the default schema of a db , how to configure to connect to a specific schema.
references :
https://quarkus.io/guides/reactive-sql-clients#postgresql-2
Any leads will be really helpful.
Upvotes: 3
Views: 3211
Reputation: 1
Regarding to quarkus 3.1.0
quarkus.datasource.reactive.additional-properties.search_path=my_schema
Upvotes: 0
Reputation: 8206
UPDATE: you can actually use search_path
as connection uri property.
I haven't tested it, but I would try this:
quarkus.datasource.reactive.additional-properties=search_path=user1
search_path
is the property used by Postgres to define the schema. The syntax of the configuration is how Smallrye Config reads parameters as map.
Upvotes: 4
Reputation: 329
Adding search_path to the connection uri will fetch results from specific schema.
Below configuration worked.
postgresql://localhost:5432/sampledb?search_path=user1
Below is the class that parse the db configuration
io.vertx.pgclient.impl.PgConnectionUriParser
Thank You David for the leads.
Reference : https://vertx.io/docs/vertx-pg-client/java/#_connection_uri
Upvotes: 6