You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to use the Postgres driver for SQLx to connect to a hosted CockroachDB. Due to the server implementation, the connection requires passing in some custom parameters, so the connection string looks like this:
let pool = PgPool::connect(
"postgres://user:pass@free-tier.gcp-us-central1.cockroachlabs.cloud:26257/db?options=--cluster%3Dmy-serverless-db-1234"
).await?;
Based on the error I get back (Error: error returned from database: codeParamsRoutingFailed: missing cluster name in connection string), it seems like SQLx is dropping the unknown options param from the query string because it's unrecognized.
Is there a good workaround for this presently or would we need to add support for an arbitrary map of options when connection?
The text was updated successfully, but these errors were encountered:
I'm attempting to use the Postgres driver for SQLx to connect to a hosted CockroachDB. Due to the server implementation, the connection requires passing in some custom parameters, so the connection string looks like this:
Based on the error I get back (
Error: error returned from database: codeParamsRoutingFailed: missing cluster name in connection string
), it seems like SQLx is dropping the unknownoptions
param from the query string because it's unrecognized.Is there a good workaround for this presently or would we need to add support for an arbitrary map of options when connection?
The text was updated successfully, but these errors were encountered: