Commit Graph

307 Commits

Author SHA1 Message Date
Hannes Ljungberg 59a66f0512 Refs #33342 -- Deprecated ExclusionConstraint.opclasses. 2021-12-27 08:55:18 +01:00
Hannes Ljungberg 0e656c02fe Fixed #33342 -- Added support for using OpClass() in exclusion constraints. 2021-12-24 11:39:00 +01:00
Mariusz Felisiak ca04659b4b
Refs #32355 -- Bumped required psycopg2 version to 2.8.4.
psycopg2 2.8.4 is the first release to support Python 3.8.
2021-12-22 20:32:55 +01:00
David Smith c6c6cd3c5a Fixed #33235 -- Removed "for = ..." from MultiWidget's <label>.
This improves accessibility for screen reader users.
2021-11-05 11:05:52 +01:00
Guilherme Martins Crocetti fc565cb539 Fixed #27147 -- Allowed specifying bounds of tuple inputs for non-discrete range fields. 2021-11-04 19:08:57 +01:00
Guilherme Martins Crocetti 52f6927d7f Refs #29738 -- Added test for serializing psycopg2's NumericRange with DecimalRangeField in migrations. 2021-11-04 19:08:57 +01:00
Sarah Abderemane 533f345c09 Refs #27694 -- Added more tests for chaining lookups with HStoreField key transforms. 2021-10-04 07:18:16 +02:00
Nick Pope c2f6c05c4c Refs #32943 -- Added support for covering exclusion constraints using SP-GiST indexes on PostgreSQL 14+. 2021-10-01 13:11:37 +02:00
Nick Pope e76f9d5b44 Refs #32943 -- Added support for covering SP-GiST indexes on PostgreSQL 14+. 2021-10-01 13:11:34 +02:00
Nick Pope bd47b9bc81 Fixed #32961 -- Added BitXor() aggregate to django.contrib.postgres. 2021-10-01 10:32:39 +02:00
Nick Pope 000d430234 Fixed typo in exception message for GiST indexes and exclusion constraints. 2021-10-01 09:46:36 +02:00
Nick Pope dd26362f63 Fixed SpGistIndex tests on PostgreSQL 14+. 2021-10-01 09:17:59 +02:00
ali ca58378390 Fixed #33114 -- Defined default output_field of StringAgg.
Thanks Simon Charette for the review.
2021-09-27 06:58:54 +02:00
Nikita Marchant 4e4082f939 Fixed #32492 -- Added TrigramWordSimilarity() and TrigramWordDistance() on PostgreSQL. 2021-09-17 13:05:15 +02:00
abhiabhi94 5a634a7b6f Fixed #32906 -- Added docs and tests for using key and index lookups on JSONBAgg results.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-26 11:23:51 +02:00
Nick Pope fee8734596 Refs #10929 -- Deprecated forced empty result value for PostgreSQL aggregates.
This deprecates forcing a return value for ArrayAgg, JSONBAgg, and
StringAgg when there are no rows in the query. Now that we have a
``default`` argument for aggregates, we want to revert to returning the
default of ``None`` which most aggregate functions return and leave it
up to the user to decide what they want to be returned by default.
2021-07-19 13:41:16 +02:00
Nick Pope 501a8db465 Fixed #10929 -- Added default argument to aggregates.
Thanks to Simon Charette and Adam Johnson for the reviews.
2021-07-19 13:04:27 +02:00
Hannes Ljungberg a06b977a91 Fixed #32776 -- Added support for Array subqueries on PostgreSQL. 2021-07-06 07:36:52 +02:00
Hannes Ljungberg d8c90d4c22 Fixed #32786 -- Moved subquery ordering clearing optimization to the _in lookup.
Co-Authored-By: Simon Charette <charette.s@gmail.com>
2021-06-30 10:08:55 +02:00
Mariusz Felisiak 5371ad1d14
Refs #26430 -- Added tests for PostgreSQL-specific aggregates on EmptyQuerySets and used subTest(). 2021-06-29 20:23:59 +02:00
Nick Pope 66af94d56e Removed unnecessary json.loads() call in test_json_agg_empty(). 2021-06-28 09:22:23 +02:00
Nick Pope e8e8e207e7 Ensured that empty result test for JSONBAgg executes a query.
Use of QuerySet.none() will cause the EmptyQuerySet aggregation
optimisation to be used. Change the test to be implemented like the
other tests for empty results in this file.
2021-06-28 09:21:57 +02:00
Nick Pope 1aca9fc7d2 Corrected test method and variable names for JSONBAgg.
This is probably a hangover from when the aggregate function was
originally called JSONAgg during development.
2021-06-28 09:17:34 +02:00
Mariusz Felisiak e07609a0d1 Refs #32858, Refs #32392 -- Restored using :: shortcut syntax in Cast() on PostgreSQL.
This partly reverts commit fdfbc66331
unnecessary since b69b0c3fe8.
2021-06-22 06:28:42 +02:00
Lucidiot b69b0c3fe8 Fixed #32858 -- Fixed ExclusionConstraint crash with index transforms in expressions. 2021-06-22 06:09:16 +02:00
Sanskar Jaiswal 8c3bd0b708 Fixed #31653 -- Added AddConstraintNotValid()/ValidateConstraint() operations for PostgreSQL. 2021-06-08 07:46:51 +02:00
Mariusz Felisiak f0a9413bd2 Refs #24121 -- Improved Value.__repr__(). 2021-05-24 07:26:53 +02:00
Hannes Ljungberg 3aa545281e Fixed #30916 -- Added support for functional unique constraints.
Thanks Ian Foote and Mariusz Felisiak for reviews.
2021-02-23 20:19:53 +01:00
Hannes Ljungberg 87acbf0631 Fixed #32458 -- Made __repr__() for Index and BaseConstraint subclasses more consistent. 2021-02-19 20:25:11 +01:00
Tilman Koschnick fdfbc66331 Fixed #32392 -- Fixed ExclusionConstraint crash with Cast() in expressions. 2021-01-29 11:05:00 +01:00
Mariusz Felisiak 5371342ed6
Fixed #32357 -- Dropped support for PostgreSQL 9.6 and PostGIS 2.3. 2021-01-19 12:25:20 +01:00
Mariusz Felisiak 2dd6a83d2d Refs #12990 -- Removed django.contrib.postgres.forms.JSONField per deprecation timeline. 2021-01-14 17:50:04 +01:00
Mariusz Felisiak 8fdb5a656a Refs #12990 -- Removed django.contrib.postgres.fields.jsonb.KeyTransform/KeyTextTransform.
Per deprecation timeline.
2021-01-14 17:50:04 +01:00
Mariusz Felisiak 7cb5712edc Refs #12990 -- Removed django.contrib.postgres.fields.JSONField per deprecation timeline. 2021-01-14 17:50:04 +01:00
Hannes Ljungberg 83fcfc9ec8 Fixed #26167 -- Added support for functional indexes.
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews.

Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
2021-01-13 11:47:50 +01:00
Mariusz Felisiak d746f28949
Refs #27095 -- Fixed test_contained_by_including_F_object when run in reverse.
Tests should not rely on auto PKs.

Test regression in 33403bf80f.
2020-12-03 09:30:33 +01:00
Ian Foote 8b040e3cbb Fixed #25534, Fixed #31639 -- Added support for transform references in expressions.
Thanks Mariusz Felisiak and Simon Charette for reviews.
2020-11-27 20:42:04 +01:00
Hannes Ljungberg 33403bf80f Refs #27095 -- Allowed (non-nested) arrays containing expressions for ArrayField lookups. 2020-11-26 10:57:58 +01:00
Hannes Ljungberg 755b327552 Added test for ArrayField's __contains lookup with subqueries. 2020-11-26 09:36:00 +01:00
Artur Beltsov 18c8ced81e Fixed #32169 -- Added distinct support to JSONBAgg. 2020-11-04 21:22:54 +01:00
Tom Carrick f5e07601b2 Fixed #32046 -- Added CreateCollation/RemoveCollation operations for PostgreSQL. 2020-10-21 10:53:44 +02:00
Mariusz Felisiak ee0abac169 Refs #32096 -- Fixed ExclusionConstraint crash with JSONField key transforms in expressions.
Regression in 6789ded0a6.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak 1f31027bb3 Refs #32096 -- Fixed crash of ArrayAgg/StringAgg/JSONBAgg with ordering over JSONField key transforms.
Regression in 6789ded0a6.

Thanks Igor Jerosimić for the report.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak 1d650ad019 Refs #32096 -- Added test for ArrayAgg over JSONField key transforms. 2020-10-14 20:56:04 +02:00
Maxim Petrov bf6d07730c Fixed #31902 -- Fixed crash of ExclusionConstraint on expressions with params. 2020-08-19 06:43:54 +02:00
Mariusz Felisiak 88af11c58b
Refs #27996 -- Fixed postgres_tests crash if not running with PostgreSQL. 2020-07-31 12:38:09 +02:00
David Smith e74b3d724e Bumped minimum isort version to 5.1.0.
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
2020-07-30 10:58:59 +02:00
Nick Pope 628c4a26ee Refs #27996 -- Doc'd no extension required for RandomUUID() on PostgreSQL 13+.
https://www.postgresql.org/docs/13/functions-uuid.html
https://www.postgresql.org/docs/13/pgcrypto.html#id-1.11.7.34.10.5
2020-07-28 07:21:16 +02:00
David Chorpash 6ec5eb5d74 Refs #31720 -- Defined default output_field of BoolAnd() and BoolOr() aggregate functions. 2020-07-21 06:42:51 +02:00
Simon Charette 156a2138db Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests. 2020-07-15 10:58:38 +02:00