psycopg2 is in maintenance mode and psycopg 3.x does not support ±infinity #3190
Labels
dependencies
Pull requests that update a dependency file
django
postgresql
python
Pull requests that update Python code
sql
NAV uses
±infinity
for several datetime fields. It makes for elegant comparisons and is indexable.Sooner or later we will have to switch away from psycopg2 to psycopg 3.x, it might be as early as for Python 3.13/Django 5.1 (Uninett/Argus#942). As of today, psycopg 3.x does NOT support
±infinity
.We could write our own database backend that uses psycopg 3.x and psycopg-infdate or we could wait and hope that psycopg 3.x adds support.
Currently, testing on psycopg 3.x should yield
django.db.utils.DataError: timestamp too large (after year 10K): 'infinity'
.The text was updated successfully, but these errors were encountered: