Skip to content
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

Parsing text representation of [var]binary data sent by server #414

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

sitingren
Copy link
Member

When querying a BINARY/VARBINARY/LONG VARBINARY type value, data sent by server is the text representation of octal bytes.

  • For a \xxx octal byte, text representation is 4 bytes. E.g. \341 gives bytes(['\\', '3', '4', '1']).
  • For an escaped \, text representation is 2 bytes. E.g. \\ gives bytes(['\\', '\\']).
  • For an ASCII character, it is the same as its text representation.

This fix parses the raw data from server and convert it back to binary.
Corresponding discussion for Go client: vertica/vertica-sql-go#87

@sitingren sitingren merged commit b557323 into vertica:master Jun 24, 2021
@sitingren sitingren deleted the parse-binary branch June 24, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant