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 postgres OID type decoding #495

Merged
merged 1 commit into from Feb 17, 2022
Merged

Fix postgres OID type decoding #495

merged 1 commit into from Feb 17, 2022

Conversation

k-tokarev
Copy link
Contributor

Issue description

If returned OID is big enough (2314556683 for example) codec throws NumberFormatException.

New Public APIs

No new public APIs added

Additional context

According to documentation (https://www.postgresql.org/docs/12/datatype-oid.html) OID type is "an unsigned four-byte integer", so it is incorrect to decode it as java Integer (which is signed an so has lower max value).

This pull request decodes OIDs as Long to fix the problem

@mp911de mp911de added the type: bug A general bug label Feb 16, 2022
@mp911de mp911de added this to the 0.8.12.RELEASE milestone Feb 16, 2022
@mp911de mp911de self-assigned this Feb 16, 2022
@mp911de mp911de merged commit 26e540e into pgjdbc:main Feb 17, 2022
mp911de pushed a commit that referenced this pull request Feb 17, 2022
Co-authored-by: k.tokarev <k.tokarev@a1-systems.com>

[#495]
@mp911de
Copy link
Collaborator

mp911de commented Feb 17, 2022

Thank you for your contribution. That's merged and backported now.

mp911de added a commit that referenced this pull request Feb 17, 2022
Fix OID decoding.

[#495]

Signed-off-by: Mark Paluch <mpaluch@vmware.com>
mp911de added a commit that referenced this pull request Feb 17, 2022
Fix OID decoding.

[#495]

Signed-off-by: Mark Paluch <mpaluch@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants