Skip to content

CockroachDB supports the PostgreSQL protocol but connection fails due to "IntervalStyle": "iso_8601"  #130

Closed
@bmisiak

Description

@bmisiak

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 of iso_8601.

SQLx sets it to the latter here:

("IntervalStyle", "iso_8601"),

Which results in:

Error: invalid value for parameter "IntervalStyle": "iso_8601"

Is supporting postgres here easy for SQLx, or would it be a significant headache? I was worried about INTERVAL 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions