summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
AgeCommit message (Collapse)Author
2025-11-20[5.2.x] Fixed #36748 -- Filtered non-standard placeholders from UNNEST queries.Chris Wesseling
Backport of 5834643f43a767fe19f2c6d10217b204e7584ec8 from main.
2025-05-23[5.2.x] Fixed #36405 -- Fixed OrderableAggMixin.order_by using OuterRef.Adam Johnson
co-authored-by: Simon Charette <charette.s@gmail.com> Backport of c2615a050036eda0bca090c707191076220cee9f from main.
2025-03-01[5.2.x] Applied Black's 2025 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/25.1.0 Backport of ff3aaf036f0cb66cd8f404cd51c603e68aaa7676 from main
2025-01-30[5.2.x] Fixed #35235 -- Removed caching of BaseExpression._output_field_or_none.sharonwoo
Backport of cbb0812683cf3236e4a4003bf7f74b119d3cde0c from main.
2025-01-20[5.2.x] Fixed #36107 -- Adjusted UNNEST bulk_create strategy to opt-out ↵Simon Charette
sized arrays. 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. Backport of 22fc151bb86a553d84c62d7effd289356e9b6c6c from main.
2025-01-06Refs #35444 -- Deprecated contrib.postgres aggregates ordering for order_by.Chris Muthig
Aligns the argument with SQL standards already used in Window.order_by and sets up for adding support to Aggregate.
2024-12-13Fixed typo in ArrayField test name.Tim Graham
2024-12-05Fixed #35944 -- Handled serialization of Unicode values in ArrayField and ↵Oleg Sverdlov
HStoreField.
2024-10-10Fixed #35717 -- Reduced Create/RemoveCollation operations when optimizing ↵Adam Johnson
migrations.
2024-10-07Fixed #35449 -- Fixed validation of array items in SplitArrayField when ↵GappleBee
remove_trailing_nulls=True.
2024-09-11Fixed #35732 -- Wrapped ConcatPair expression in parentheses to ensure ↵Gastón Avila
operator precedence. When ConcatPair was updated to use || this lost the implicit wrapping from CONCAT(...). This broke the WHERE clauses when used in combination with PostgreSQL trigram similarity. Regression in 6364b6ee1071381eb3a23ba6b821fc0d6f0fce75. Co-authored-by: Emiliano Cuenca <106986074+emicuencac@users.noreply.github.com>
2024-09-03Fixed #35704 -- Fixed reduction for AddIndex subclasses.Adam Johnson
2024-08-12Fixed #35575 -- Added support for constraint validation on GeneratedFields.Mark Gensler
2024-08-05Fixed #35638 -- Updated validate_constraints to consider db_default.David Sanders
2024-07-03Refs #28900 -- Made SELECT respect the order specified by values(*selected).Simon Charette
Previously the order was always extra_fields + model_fields + annotations with respective local ordering inferred from the insertion order of *selected. This commits introduces a new `Query.selected` propery that keeps tracks of the global select order as specified by on values assignment. This is crucial feature to allow the combination of queries mixing annotations and table references. It also allows the removal of the re-ordering shenanigans perform by ValuesListIterable in order to re-map the tuples returned from the database backend to the order specified by values_list() as they'll be in the right order at query compilation time. Refs #28553 as the initially reported issue that was only partially fixed for annotations by d6b6e5d0fd4e6b6d0183b4cf6e4bd4f9afc7bf67. Thanks Mariusz Felisiak and Sarah Boyce for review.
2024-05-27Fixed #35479 -- Dropped support for PostgreSQL 13 and PostGIS 3.0.Mariusz Felisiak
2024-05-14Fixed #35275 -- Fixed Meta.constraints validation crash on UniqueConstraint ↵Mariusz Felisiak
with OpClass(). This also introduces Expression.constraint_validation_compatible that allows specifying that expression should be ignored during a constraint validation.
2024-05-10Fixed #35436 -- Fixed displaying Unicode chars in forms.HStoreField.SaJH
2024-04-25Fixed #35339 -- Fixed PostgreSQL aggregate's filter and order_by params order.Chris Muthig
Updated OrderableAggMixin.as_sql() to separate the order_by parameters from the filter parameters. Previously, the parameters and SQL were calculated by the Aggregate parent class, resulting in a mixture of order_by and filter parameters. Thanks Simon Charette for the review.
2024-03-01Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition.Simon Charette
Once the deprecation period ends CheckConstraint.check() can become the documented method that performs system checks for BaseConstraint subclasses.
2024-02-29Fixed #35234 -- Added system checks for invalid model field names in ↵Simon Charette
ExclusionConstraint.expressions.
2024-02-09Fixed #35175 -- Made migraton writer preserve keyword-only arguments.David Sanders
Thanks Gerald Goh for the report.
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2024-01-17Fixed #31700 -- Made makemigrations command display meaningful symbols for ↵Amir Karimi
each operation.
2024-01-02Fixed #35075 -- Added deduplicate_items parameter to BTreeIndex.Nick Pope
2023-12-30Fixed #29049 -- Added slicing notation to F expressions.Nick Pope
Co-authored-by: Priyansh Saxena <askpriyansh@gmail.com> Co-authored-by: Niclas Olofsson <n@niclasolofsson.se> Co-authored-by: David Smith <smithdc@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Abhinav Yadav <abhinav.sny.2002@gmail.com>
2023-12-12Fixed #34013 -- Added QuerySet.order_by() support for annotation transforms.Simon Charette
Thanks Eugene Morozov and Ben Nace for the reports.
2023-09-25Fixed #34849 -- Avoided raising RuntimeWarning about import-time queries ↵David Sanders
when apps are reinitialized with test tools. Regression in fbd16438f46bc2128926958ad24331da5d1b406f.
2023-09-20Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5.Mariusz Felisiak
2023-09-18Refs #33308 -- Removed support for passing encoded JSON string literals to ↵Mariusz Felisiak
JSONField & co. Per deprecation timeline.
2023-09-18Refs #33872 -- Removed ↵Mariusz Felisiak
django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField. Per deprecation timeline.
2023-06-18Fixed #34662 -- Corrected number in error messages for ↵şuayip üzülmez
Array(Min/Max)LengthValidator.
2023-04-06Fixed #34459 -- Fixed SearchVector() crash for parameters with % symbol.Mariusz Felisiak
Thanks Patryk Zawadzki for the report. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
2023-04-06Moved SearchVectorIndexTests.test_search_vector_index to ↵Mariusz Felisiak
postgres_tests.test_indexes.
2023-03-24Fixed #28553 -- Fixed annotation mismatch with ↵David Wobrock
QuerySet.values()/values_list() on compound queries. Co-authored-by: Matthias Kestenholz <mk@feinheit.ch>
2023-03-07Fixed #32172 -- Adapted signals to allow async handlers.Jon Janzen
co-authored-by: kozzztik <kozzztik@mail.ru> co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2023-03-05Refs #34381, Refs #10929 -- Fixed ↵David Smith
postgres_tests.test_aggregates.TestGeneralAggretate.test_empty_result_set() on PostgreSQL 14+. Follow up to 0be8095b254fad65b2480d677ebe6098c41bbad6.
2023-02-23Fixed #34338 -- Allowed customizing code of ValidationError in ↵Xavier Fernandez
BaseConstraint and subclasses.
2023-02-23Refs #33829 -- Added violation_error_message to constraints' __repr__().Xavier Fernandez
2023-02-20Fixed #34346 -- Ordered selected expressions by position.Simon Charette
Used the same approach as for #34176 by using selected expressions position to prevent ambiguous aliases in collisions. Thanks henribru for the report. Regression in 04518e310d4552ff7595a34f5a7f93487d78a406.
2023-02-07Fixed #34285 -- Fixed index/slice lookups on filtered aggregates with ↵Nils VAN ZUIJLEN
ArrayField. Thanks Simon Charette for the review.
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2023-01-17Refs #33342 -- Removed ExclusionConstraint.opclasses per deprecation timeline.Mariusz Felisiak
2023-01-17Refs #10929 -- Stopped forcing empty result value by PostgreSQL aggregates.Mariusz Felisiak
Per deprecation timeline.
2023-01-09Fixed #34176 -- Fixed grouping by ambiguous aliases.Simon Charette
Regression in b7b28c7c189615543218e81319473888bc46d831. Refs #31377. Thanks Shai Berger for the report and reviews. test_aggregation_subquery_annotation_values_collision() has been updated as queries that are explicitly grouped by a subquery should always be grouped by it and not its outer columns even if its alias collides with referenced table columns. This was not possible to accomplish at the time 10866a10 landed because we didn't have compiler level handling of colliding aliases.
2022-12-28Fixed #14094 -- Added support for unlimited CharField on PostgreSQL.Adrian Torres
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-12-15Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-12-12Refs #33308 -- Moved psycopg2 imports to the psycopg_any module.Florian Apolloner
2022-12-10Fixed #34205 -- Fixed Meta.constraints validation crash with ArrayField and ↵James Gillard
__len lookup. Regression in 88fc9e2826044110b7b22577a227f122fe9c1fb5 that began manifesting in Django 4.1.
2022-12-06Used homogeneous weights list in SearchRank tests.Florian Apolloner
A homogenous array is required on PostgreSQL.