Skip to content

fix: RowDescription length was wrong for non-ASCII column names - #4871

Open
olavloite wants to merge 1 commit into
postgresql-dialectfrom
fix-column-name-length-mismatch
Open

olavloite wants to merge 1 commit into
postgresql-dialectfrom
fix-column-name-length-mismatch

Conversation

@olavloite

Copy link
Copy Markdown
Collaborator

The length header counted UTF-16 chars from String.length(), while the payload writes UTF-8 bytes. Any column name outside ASCII made the declared length too small, so clients stopped reading mid-message and lost sync with the wire protocol.

Encode the column names once in the constructor and derive both the length and the payload from those bytes, so the two cannot drift apart.

The length header counted UTF-16 chars from String.length(), while the
payload writes UTF-8 bytes. Any column name outside ASCII made the
declared length too small, so clients stopped reading mid-message and
lost sync with the wire protocol.

Encode the column names once in the constructor and derive both the
length and the payload from those bytes, so the two cannot drift apart.
@olavloite
olavloite force-pushed the fix-column-name-length-mismatch branch from 6d6204a to 098de58 Compare September 11, 2026 10:26
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.

2 participants