#36045: Add Support for PostgreSQL Infinity and -Infinity in Date/Time Fields
-------------------------------------+-------------------------------------
Reporter: Kavin Bharathi | Type: New
| feature
Status: new | Component: Database
| layer (models, ORM)
Version: 5.1 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
**Proposed Feature:**
1. Add support for parsing PostgreSQL's infinity and -infinity values into
Django models.
2. Represent infinity and -infinity using custom Python objects or
constants (e.g., django.db.utils.Infinity and -Infinity).
3. Ensure seamless integration with Django's ORM for querying, inserting,
and updating fields containing these values.
4. Provide a mechanism to serialize and deserialize these values (e.g.,
JSON serialization).
**Use Cases:**
1. Handling open-ended event durations.
2. Representing date ranges without a start or end boundary.
3. Supporting applications that already use these values in their
PostgreSQL databases.
**Benefits:**
1. Enables Django developers to work with PostgreSQL databases more
effectively.
2. Expands Django's compatibility with PostgreSQL's advanced features.
**Potential Challenges:**
1. Ensuring backward compatibility with existing applications.
2. 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)
--
Ticket URL: <https://code.djangoproject.com/ticket/36045>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019417bfaf82-eacf5cbc-06fb-4ba5-acfb-511624009fe1-000000%40eu-central-1.amazonses.com.