Skip to content

[9.0] Truncate sub-microsecond ticks when formatting TimeSpan as interval - #3949

Merged
roji merged 1 commit into
hotfix/9.0.5from
roji-9-0-interval-backport
Oct 14, 2026
Merged

roji merged 1 commit into
hotfix/9.0.5from
roji-9-0-interval-backport

Conversation

@roji

@roji roji commented Oct 14, 2026

Copy link
Copy Markdown
Member

Backport of #3932.

Fixes #3926.

Truncate sub-microsecond TimeSpan ticks before formatting PostgreSQL intervals, preventing a trailing decimal separator in SQL literals and JSON values. Includes the original SQL-literal and JSON reader/writer regression coverage; no compatibility changes were needed.

Validation: NpgsqlTypeMappingTest passed (112 passed, 6 skipped) using session-local .NET SDK 9.0.312 and a session-local NuGet.org restore configuration. Repository SDK and dependency configuration are unchanged.

Fixes #3926

(cherry picked from commit e596f10)
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6ce62f74-21d8-4048-8348-2153f7970aa8
@roji
roji merged commit bf17484 into hotfix/9.0.5 Oct 14, 2026
9 of 13 checks passed
@roji
roji deleted the roji-9-0-interval-backport branch October 14, 2026 17:33
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.

TimeSpan with sub-microsecond ticks is serialized to an invalid JSON interval string

2 participants