Opened 4 months ago
Last modified 4 months ago
#36045 closed New feature
Add Support for PostgreSQL Infinity and -Infinity in Date/Time Fields — at Initial Version
Description ¶
Proposed Feature:
- Add support for parsing PostgreSQL's infinity and -infinity values into Django models.
- Represent infinity and -infinity using custom Python objects or constants (e.g., django.db.utils.Infinity and -Infinity).
- Ensure seamless integration with Django's ORM for querying, inserting, and updating fields containing these values.
- Provide a mechanism to serialize and deserialize these values (e.g., JSON serialization).
Use Cases:
- Handling open-ended event durations.
- Representing date ranges without a start or end boundary.
- Supporting applications that already use these values in their PostgreSQL databases.
Benefits:
- Enables Django developers to work with PostgreSQL databases more effectively.
- Expands Django's compatibility with PostgreSQL's advanced features.
Potential Challenges:
- Ensuring backward compatibility with existing applications.
- Deciding on a Python representation for infinity that integrates well with Django's ORM and other Python libraries.
References:
[PostgreSQL Documentation on Infinity](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME-SPECIAL-VALUES)
Note:
See TracTickets
for help on using tickets.