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

fix: use array lower bound 1 by default #1302

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

olavloite
Copy link
Collaborator

PGAdapter would return arrays in binary format with lower bound 0 (zero) by default. This is not consistent with open-source PostgreSQL, which uses 1 as the default lower bound, and also not consistent with the text format, which does not have a field for returning the lower bound. The lower bound is then assumed to be 1. This changes the default lower bound for binary encoded arrays to 1.

Fixes #1259

PGAdapter would return arrays in binary format with lower bound
0 (zero) by default. This is not consistent with open-source
PostgreSQL, which uses 1 as the default lower bound, and also
not consistent with the text format, which does not have a field
for returning the lower bound. The lower bound is then assumed
to be 1. This changes the default lower bound for binary
encoded arrays to 1.

Fixes #1259
Copy link

codecov bot commented Dec 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e7a7e90) 89.95% compared to head (0a22d95) 89.95%.

Additional details and impacted files
@@                  Coverage Diff                  @@
##             postgresql-dialect    #1302   +/-   ##
=====================================================
  Coverage                 89.95%   89.95%           
  Complexity                 2591     2591           
=====================================================
  Files                       141      141           
  Lines                      8889     8889           
  Branches                   1290     1290           
=====================================================
  Hits                       7996     7996           
  Misses                      625      625           
  Partials                    268      268           
Flag Coverage Δ
all_tests 89.95% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@olavloite olavloite merged commit 78e01fa into postgresql-dialect Dec 27, 2023
33 checks passed
@olavloite olavloite deleted the array-lower-bound-one branch December 27, 2023 09:51
@jackpertschuk
Copy link

thanks!

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.

Arrays encoded using the binary protocol are always sent with lower bound 0
3 participants