Implemented the binary wire format#2394
Merged
Merged
Conversation
f0d13b2 to
e52522b
Compare
e52522b to
aeaf9c4
Compare
Contributor
|
This was
linked to
issues
Mar 2, 2026
Extended protocol sends empty binary payload for NUMERIC/DECIMAL columns, causing client panic
#2347
Closed
Contributor
|
fulghum
approved these changes
Mar 2, 2026
fulghum
left a comment
Contributor
There was a problem hiding this comment.
Looks great. Very cool that we can easily run the new test harness against a Postgres server and confirm that our expected wire messages are correct.
Contributor
|
A customer pinged us about needing this change, so I'm going to go ahead and merge it in and get a release out for them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes:
In a nutshell, we did not respect a client's wishes when they requested that the results for some columns are returned in their binary format (obtained from their
sendfunction). Instead, we had hardcoded that some types, in certain circumstances, would only return their binary format, while others would strictly return their text format. This PR implements the binary wire format for every type that is currently supported. This also fixes numerous bugs that were hidden due to our incorrect behavior.In addition to the above fixes, this PR introduces a new test harness for analyzing our compatibility with the wire messages returned directly to Postgres clients. Thousands of lines of new tests have been added that ensure we're returning the exact correct results for a given set of messages (not just queries but the actual client messages), and the test harness allows for quick iteration when comparing what a Postgres server sends versus a Doltgres server, so we can ensure that we're returning the same bytes, not just the same overall structure.