When I try to connect to the database on postgres via jdbc, I get the following error: org.postgresql.util.PSQLException: ERROR: Unsupported startup parameter: search_path
This is how I create the connection:
val connection = DriverManager.getConnection(profile.connection + Option(profile.catalog).getOrElse("")+ "?currentSchema="+Option(profile.schema).getOrElse(""),
profile.user, profile.password)
I use scala and a custom version of postgres.
pgbauncer
In short, pgbouncer at least my version does not work with the
search_path
parameter, this discussion led me to this idea. There are two ways to fix this problem:currentSchema
parameter in the connection string and create connection like this: Then he will choose the scheme according to the rule set, in search_path, they usually set something like"$user", public
, in this case, when connecting, he first tries to choose the same scheme as the user name, and if he does not find such a scheme, he chooses public.