Skip to content

Conversation

@Mandukhai-Alimaa
Copy link
Contributor

This PR fixes an issue in the PostgreSQL driver’s parameter binding logic where empty strings were incorrectly treated as NULL values.

Null detection was inferred from param_lengths[col] == 0 and empty strings (valid zero-length values) were misclassified as NULL.

Closes #3585

@github-actions github-actions bot added this to the ADBC Libraries 21 milestone Oct 20, 2025
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find!

Can we add a unit test? Either in C++ or in Python. Ideally we'd test that empty strings and empty binary values can be bound and selected back.

Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lidavidm lidavidm merged commit 2964c54 into apache:main Oct 21, 2025
68 of 76 checks passed
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.

Empty string is inserted as None when it's in the parameters in postgresql

2 participants