Skip to content

Conversation

alex-kulakov
Copy link
Contributor

  • From PostgreSQL 9.0 there is more efficient and faster way to get total milliseconds of native interval, rather than general approach based on sum of each part - using extraction of 'epoch' part of interval
  • Improved Date/DateTime/DateTimeOffset/TimeSpan .Milliseconds extraction, it lacked trunc operation for milliseconds as well as for seconds (which existed). Now this trunc operation added and results are correct

… int8

otherwise milliseconds part of 59.999999 seconds became 0
Based on epoch extraction, it is less complicated than sum of several parts
expecially when base expression is complicated so it required many copies of
base expression.
New approach is also lest costy.
Trunc operation added to correctly return values
@alex-kulakov alex-kulakov merged commit ffe8931 into 7.1 Mar 4, 2025
@alex-kulakov alex-kulakov deleted the 7.1-pgsql-ms-extraction-fix branch March 4, 2025 10: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.

1 participant