Repository navigation
Add support for PostgreSQL oid8 and oid8[] - #2696
Merged
Merged
Conversation
Register the PostgreSQL 19 oid8 type with Uint64Codec and its array type with ArrayCodec. Add OID constants for both types. Add round-trip coverage for zero, maximum uint64, nullable values, and string conversion. Cover array values with a NULL element using both describe/execute and simple protocol query modes.
Owner
|
Seems fair to merge now. Can't see this getting reverted before final PG 19 release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2695.
PostgreSQL 19 introduces
oid8, an unsigned eight-byte object identifier type. Add its OID constants and default type registrations so pgx recognizesoid8andoid8[]without manual registration.Register
oid8(OID 6437) with the existingUint64Codec, and_oid8(OID 6442) withArrayCodec.Add round-trip tests covering zero, the maximum uint64 value, nullable values, and string conversion. The array test covers maximum values, NULL elements, and zero using describe/execute and simple protocol query modes. The new database tests skip PostgreSQL versions below 19 and CockroachDB.
Validation:
Passed with Go 1.25.5 against a temporary PostgreSQL 19rc1 instance. All selected tests ran without skips. Also verified
CopyFrom,Rows.Values(), anddatabase/sqlhandling of the maximum uint64 value and NULL with the race detector enabled.Since PostgreSQL 19 has not reached its final release yet, I'd appreciate your guidance on the appropriate timing for merging this change.