Tags: SectorLabs/django-postgres-extra
Tags
Fix automatic hstore extension creation not working on Django 4.2 or … …newer The following change broke the auto setup: django/django@d3e746a This breaks because the call to `pscygop2.extras.register_hstore` is now conditional. Before, it would be called multiple times with empty OIDS, when eventually our auto registration would kick in and psycopg2 would fetch the OIDs itself.
Make `ExcludedCol` work with fields and use them when constructing SE… …T clause The recent changes to add support for custom update values had a side effect that upserts with PostGIS related fields would break. They would break while building the `SET` clause. Django would try to figure out the right placeholder for the expression, even though none is required. Since there was not associated field information, it couldn't figure it out. By passing the field information, we ensure we always build the SET clause correctly.
Tolerate new columns being added to tables during upsert Up until now, upserting to a table which had a column added not know to Django would make the query crash. This commit introduces a more robust mechanism to constructing model instances from query results that tolerates a column being added at the end of the table.
PreviousNext