<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/db/backends/postgresql/compiler.py, branch main</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=main</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2026-03-13T00:01:02Z</updated>
<entry>
<title>Fixed #36727 -- Deprecated Field.get_placeholder in favor of get_placeholder_sql.</title>
<updated>2026-03-13T00:01:02Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2025-11-22T18:32:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=1a8fd5cf75bf855852f6bc2f75c3da9f7b145669'/>
<id>urn:sha1:1a8fd5cf75bf855852f6bc2f75c3da9f7b145669</id>
<content type='text'>
The lack of ability of the get_placeholder call chain to return SQL and
parameters separated so they can be mogrified by the backend at execution time
forced implementations to dangerously interpolate potentially user controlled
values.

The get_placeholder_sql name was chosen due to its proximity to the previous
method, but other options such as Field.as_sql were considered but ultimately
rejected due to its different input signature compared to Expression.as_sql
that might have lead to confusion.

There is a lot of overlap between what Field.get_db_prep_value and
get_placeholder_sql do but folding the latter in the former would require
changing its return signature to return expression which is a way more invasive
change than what is proposed here.

Given we always call get_db_prep_value it might still be an avenue worth
exploring in the future to offer a publicly documented interface to allow field
to take an active part in the compilation chain.

Thanks Jacob for the review.
</content>
</entry>
<entry>
<title>Refs #33647 -- Fixed silent data truncation in bulk_create on Postgres.</title>
<updated>2025-12-31T15:41:55Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2025-12-23T06:25:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=d6ae2ed868e43671afc4d433c3d8f4d27f7eb555'/>
<id>urn:sha1:d6ae2ed868e43671afc4d433c3d8f4d27f7eb555</id>
<content type='text'>
Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491.

The UNNEST strategy is affected by the same problem bulk_update has wrt/
to silent data truncation due to its usage of db_type which always returns
a parametrized subtype.
</content>
</entry>
<entry>
<title>Added DatabaseFeatures.prohibits_dollar_signs_in_column_aliases.</title>
<updated>2025-12-04T16:37:22Z</updated>
<author>
<name>Tim Graham</name>
<email>timograham@gmail.com</email>
</author>
<published>2025-12-03T23:06:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=17d644c8e257c2ea5cc738fb7a9c47989e29bf09'/>
<id>urn:sha1:17d644c8e257c2ea5cc738fb7a9c47989e29bf09</id>
<content type='text'>
This is also applicable on CockroachDB.
</content>
</entry>
<entry>
<title>Fixed CVE-2025-13372 -- Protected FilteredRelation against SQL injection in column aliases on PostgreSQL.</title>
<updated>2025-12-02T12:21:07Z</updated>
<author>
<name>Jacob Walls</name>
<email>jacobtylerwalls@gmail.com</email>
</author>
<published>2025-11-17T22:09:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=5b90ca1e7591fa36fccf2d6dad67cf1477e6293e'/>
<id>urn:sha1:5b90ca1e7591fa36fccf2d6dad67cf1477e6293e</id>
<content type='text'>
Follow-up to CVE-2025-57833.

Thanks Stackered for the report, and Simon Charette and Mariusz Felisiak
for the reviews.
</content>
</entry>
<entry>
<title>Fixed #36748 -- Filtered non-standard placeholders from UNNEST queries.</title>
<updated>2025-11-20T22:22:46Z</updated>
<author>
<name>Chris Wesseling</name>
<email>chris@maykinmedia.nl</email>
</author>
<published>2025-11-20T14:01:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=5834643f43a767fe19f2c6d10217b204e7584ec8'/>
<id>urn:sha1:5834643f43a767fe19f2c6d10217b204e7584ec8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bumped minimum isort version to 7.0.0.</title>
<updated>2025-10-16T18:59:02Z</updated>
<author>
<name>Jacob Walls</name>
<email>jacobtylerwalls@gmail.com</email>
</author>
<published>2025-10-16T14:33:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=d980d68609448a4c85763fa34e471ff80540888b'/>
<id>urn:sha1:d980d68609448a4c85763fa34e471ff80540888b</id>
<content type='text'>
Added ignores relating to https://github.com/PyCQA/isort/issues/2352.
</content>
</entry>
<entry>
<title>Fixed #36502 -- Restored UNNEST strategy for foreign key bulk inserts on PostgreSQL.</title>
<updated>2025-07-10T16:33:00Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2025-07-10T16:33:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=0fe218842e0e396e3ab3982bd21227968a9e7fd8'/>
<id>urn:sha1:0fe218842e0e396e3ab3982bd21227968a9e7fd8</id>
<content type='text'>
Regression in 764af7a3d6c0b543dcf659a2c327f214da768fe4.</content>
</entry>
<entry>
<title>Fixed #36289 -- Fixed bulk_create() crash with nullable geometry fields on PostGIS.</title>
<updated>2025-04-04T19:33:04Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2025-04-03T15:15:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=764af7a3d6c0b543dcf659a2c327f214da768fe4'/>
<id>urn:sha1:764af7a3d6c0b543dcf659a2c327f214da768fe4</id>
<content type='text'>
Swapped to an allow list instead of a deny list for field types to
determine if the UNNEST optimization can be enabled to avoid further
surprises with other types that would require further specialization to
adapt.

Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491.

Thanks Joshua Goodwin for the report and Sarah Boyce for the test.
</content>
</entry>
<entry>
<title>Fixed #36107 -- Adjusted UNNEST bulk_create strategy to opt-out sized arrays.</title>
<updated>2025-01-20T13:15:32Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2025-01-17T18:41:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=22fc151bb86a553d84c62d7effd289356e9b6c6c'/>
<id>urn:sha1:22fc151bb86a553d84c62d7effd289356e9b6c6c</id>
<content type='text'>
The array fields opt-out heuristic failed to account for sized arrays.

Note that we keep relying on db_type as opposed to performing an ArrayField
instance check against the column's field as there could be other
implementations of model fields that use Postgres arrays to store the
optimization must be disabled for all of them.

Refs #35936.

Thanks Claude Paroz for the report and test.
</content>
</entry>
<entry>
<title>Fixed #35936 -- Used unnest for bulk inserts on Postgres when possible.</title>
<updated>2024-12-11T12:56:18Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2024-11-17T05:30:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a16eedcf9c69d8a11d94cac1811018c5b996d491'/>
<id>urn:sha1:a16eedcf9c69d8a11d94cac1811018c5b996d491</id>
<content type='text'>
This should make bulk_create significantly faster on Postgres when provided
only literal values.

Thanks James Sewell for writing about this technique, Tom Forbes for
validating the performance benefits, David Sanders and Mariusz Felisiak
for the review.
</content>
</entry>
</feed>
