Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.