Skip to content

sql: wrong error code returned when performing invalid byte sequence casts #41547

Open
@asubiotto

Description

@asubiotto

These were found running the https://github.com/lib/pq test suite against cockroach. Specifically TestBinaryByteSlicetoUUID fails because an error with the Syntax error code is returned rather than the expected CharacterNotInRepertoire code (postgres does this). TestBinaryByteSliceToInt is also expected to fail with the same error code but returns a ProtocolViolation error seemingly further up the stack. The latter deserves some more investigation.

We should also sanity check other cases in which we return Syntax error codes when parsing strings (e.g. string as decimal).

Jira issue: CRDB-5437

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-error-handlingError messages, error propagations/annotationsA-sql-pgcompatSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions