-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CockroachDB supports the PostgreSQL protocol but connection fails due to "IntervalStyle": "iso_8601" #130
Comments
Yeah, that really only matters if we actually support encoding and decoding intervals which we don't currently. Neither @mehcode is there another reason you have |
I'd accept just removing the explicit set of I'm not sure I'm comfortable claiming to support CockroachDB. If we can make this change and it works 100%, great, but we probably need to enumerate a "Database Support" chart like Rust does for platforms (perhaps on the Readme). We could have "Tier 1" being guaranteed and "Tier 2" being "someone told us this works". I'd mark CockroachDB under "Tier 2". |
@mehcode For sure, agreed. I have tested it and it seems to be working beautifully with SQLx after removing .. as well as other ordinary PostgreSQL clients: I'll submit a PR to remove it. It's only a |
Support more server versions, including CockroachDB, which only supports the `postgres` style.
postgres: remove IntervalStyle to fix #130
Support more server versions, including CockroachDB, which only supports the `postgres` style.
Hi.
I tried connecting to CockroachDB just now and hit a little snafu. It supports the PostgreSQL protocol, but it apparently requires IntervalStyle to be set to
postgres
instead ofiso_8601
.SQLx sets it to the latter here:
sqlx/sqlx-core/src/postgres/connection.rs
Line 108 in d269506
Which results in:
Is supporting
postgres
here easy for SQLx, or would it be a significant headache? I was worried aboutINTERVAL
fields but they seem to be returned to the consumer as strings, since conversion to Duration impls haven't been written yet.When I naively changed the field to
postgres
in my fork, connection succeeded and queries work.The text was updated successfully, but these errors were encountered: