Skip to content

[8.0] Fix null propagation in date/time interval construction - #4016

Merged
roji merged 1 commit into
hotfix/8.0.12from
roji-backport-interval-fix-8-0
Oct 18, 2026
Merged

roji merged 1 commit into
hotfix/8.0.12from
roji-backport-interval-fix-8-0

Conversation

@roji

@roji roji commented Oct 18, 2026

Copy link
Copy Markdown
Member

Backport of #4008 to hotfix/8.0.12.

Use PgUnknownBinaryExpression("||") when constructing nonconstant date/time intervals so nullable arguments propagate null instead of being coalesced to empty strings. Normal C# string concatenation is unchanged.

Adapt the nullable DateTime.AddDays and DateOnly.AddYears/AddMonths regression coverage to the existing 8.0 operators test infrastructure, covering null, zero, positive, and negative amounts. Update the parameterized Northwind interval SQL baseline.

Validation on PostgreSQL 18.4: 558 focused cases passed, 7 existing skips; tests serialized with the shared backport lock. Confirmed that the null regression reproduces PostgreSQL error 22007 without the fix.

Fixes #2889

Backport 6c1f5e4 from #4008, adapting nullable-argument regression coverage to the existing 8.0 operators test infrastructure.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: e3176f61-58ea-453d-94b3-fa642f2c42ab
@roji roji linked an issue Oct 18, 2026 that may be closed by this pull request
@roji
roji merged commit d9f9cc9 into hotfix/8.0.12 Oct 18, 2026
9 checks passed
@roji
roji deleted the roji-backport-interval-fix-8-0 branch October 18, 2026 11:32
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.

PostgresException: 22007: invalid input syntax for type interval: " days"

1 participant