Skip to content

Map timestamp min/max to infinity by default #4034

Description

@roji

We have the Convert Infinity DateTime connection string parameter, which makes Npgsql convert DateTime.Min/MaxValue to PostgreSQL -infinity and infinity. We should make this the default: in general, when MinValue/MaxValue are used, they are not used as concrete values, but rather as a value that is smaller/larger than any other value. With all the other timestamp breakage we're introducing in 6.0, we should do this too rather than adding more in the future.

Convert Infinity Date Time will still be there to switch back to the legacy behavior, and send DateTime.Min/MaxValue as simple values (e.g. 9999-12-31 23:59:59.999999)

Activity

  1. added this to the 6.0.0 milestone on Oct 13, 2021
  2. self-assigned this
    on Oct 13, 2021
  3. added a commit that references this issue on Oct 13, 2021
    7a1ae3f
  4. added a commit that references this issue on Oct 13, 2021
    dba60fb
  5. added a commit that references this issue on Oct 24, 2021
  6. linked a pull request that will close this issueDo infinity conversions for LocalDateTime #4062on Oct 24, 2021
  7. added theissue type on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions