Skip to content

Fix/postgres infinity - #127

Merged
dnsl48 merged 2 commits into
masterfrom
fix/postgres-infinity
Aug 9, 2026
Merged

Fix/postgres infinity#127
dnsl48 merged 2 commits into
masterfrom
fix/postgres-infinity

Conversation

@dnsl48

@dnsl48 dnsl48 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

dnsl48 added 2 commits August 9, 2026 15:42
PostgreSQL 14 added binary markers for positive and negative numeric infinity. The old encoder handled zero and NaN, but infinity reached an unreachable branch and panicked in the caller.

Teach the shared Fraction and Decimal codec to read and write both markers. The regression tests cover constructors, division by zero, and appending to an existing query buffer while keeping finite and NaN behaviour unchanged.

Refs #123
Document that numeric infinities require PostgreSQL 14 or newer and an unconstrained NUMERIC column. Older servers and constrained numeric columns reject those values.

The README, crate documentation, and unreleased changelog now describe the same boundary so users do not have to infer it from the wire-format code.
@dnsl48
dnsl48 merged commit 23cce20 into master Aug 9, 2026
8 checks passed
@dnsl48
dnsl48 deleted the fix/postgres-infinity branch August 9, 2026 03:54
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.

1 participant