Commit Graph

274 Commits

Author SHA1 Message Date
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
Simon Charette 5227101787 Defined output_field of Func() in test_grouping_by_annotations_with_array_field_param().
output_field cannot be automatically determined because the first
argument passed to ARRAY_LEN is an ArrayField and the second one is an
integer.
2020-06-24 12:26:36 +02:00
Hannes Ljungberg 0d6d4e78b1 Fixed #31709 -- Added support for opclasses in ExclusionConstraint. 2020-06-16 08:16:14 +02:00
Hannes Ljungberg 7edc6e53a7 Fixed #31702 -- Added support for PostgreSQL opclasses in UniqueConstraint. 2020-06-16 07:19:00 +02:00
John Parton a8473b4d34 Fixed #31691 -- Added ordering support to JSONBAgg. 2020-06-13 00:06:29 +02:00
Hannes Ljungberg e0cdd0fcf5 Fixed #31649 -- Added support for covering exclusion constraints on PostgreSQL 12+. 2020-06-12 23:23:21 +02:00
Hannes Ljungberg 8c7992f658 Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+. 2020-06-04 12:26:22 +02:00
Adam Johnson 22a59c01c0 Refs #31615 -- Added EXISTS clauses to extension operations. 2020-06-03 07:02:48 +02:00
Adam Johnson fa58450a9a Fixed #31468 -- Allowed specifying migration filename in Operation.
This adds also suggested filename for many built-in operations.
2020-05-28 11:42:53 +02:00
Frantisek Holop d693a086de Fixed #31615 -- Made migrations skip extension operations if not needed.
- Don't try to create an existing extension.
- Don't try to drop a nonexistent extension.
2020-05-27 10:48:44 +02:00
Frantisek Holop 73216aaaa9 Used not installed extension in CreateExtension() tests.
uuid-ossp was already installed.
2020-05-27 10:46:22 +02:00
Hannes Ljungberg 952afc166c Fixed #31601 -- Fixed SearchHeadlineTests on PostgresSQL 9.6.18+, 10.13+, 11.8+, and 12.3+. 2020-05-19 07:46:22 +02:00
Mariusz Felisiak e536fa5ce1
Fixed #31579 -- Dropped support for PostgreSQL 9.5 and PostGIS 2.2. 2020-05-14 06:33:00 +02:00
sage 6789ded0a6 Fixed #12990, Refs #27694 -- Added JSONField model field.
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael
Michel for mentoring this Google Summer of Code 2019 project and
everyone else who helped with the patch.

Special thanks to Mads Jensen, Nick Pope, and Simon Charette for
extensive reviews.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-05-08 07:23:31 +02:00
Mariusz Felisiak 106e8dc91a
Completed test coverage for ExclusionConstraint.
Dropping exclusion constraints was untested.
2020-05-07 10:02:14 +02:00
Ian Foote b4068bc656 Fixed #31455 -- Added support for deferrable exclusion constraints on PostgreSQL. 2020-05-01 09:08:36 +02:00
Author: Mads Jensen 6461583b6c Removed unused __str__() methods in tests models.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2020-04-15 20:20:32 +02:00
Hannes Ljungberg 0b51a4f894 Fixed #28194 -- Added support for normalization and cover density to SearchRank. 2020-03-23 11:00:55 +01:00
Baptiste Mispelon 3baf92cf82 Fixed #31340 -- Allowed query expressions in SearchQuery.value and __search lookup. 2020-03-16 10:27:23 +01:00
Mariusz Felisiak e2417010da Refs #31304 -- Added tests for using __search lookup with combined SearchQuerys with the same config. 2020-03-13 12:06:28 +01:00
Baptiste Mispelon dd704c6705 Refs #31340 -- Simplified SearchQuery by making it subclass Func. 2020-03-13 11:38:43 +01:00
Hasan Ramezani ec292f261d Fixed #31347 -- Checked allow_migrate() in CreateExtension operation. 2020-03-09 12:13:18 +01:00
Simon Charette 7c8b043a03 Refs #31304 -- Made __search lookup default to its rhs' config.
This make the SearchLookup lookup more coherent with its
SearchVectorExact base which configures its rhs SearchQuery with its
lhs' config.
2020-03-06 10:23:39 +01:00
Hannes Ljungberg 65ab4f9f03 Fixed #31147 -- Added SearchHeadline to django.contrib.postgres. 2020-03-03 15:39:52 +01:00
Simon Charette d0f1c03331 Refs #31211 -- Prevented SearchConfig nesting in SearchVector and SearchQuery init.
Passing a SearchConfig instance directly to SearchVector and
SearchQuery would result in nested SearchConfig instance.
2020-02-26 08:03:46 +01:00
Jon Dufresne f48f671223 Refs #31233 -- Changed DatabaseWrapper._nodb_connection to _nodb_cursor().
It is now a method instead of a property and returns a context manager
that yields a cursor on entry and closes the cursor and connection upon
exit.
2020-02-06 15:29:38 +01:00
adamb70 4c6ab1f2aa Fixed #28528 -- Allowed combining SearchVectors with different configs. 2020-02-06 07:52:50 +01:00
Mariusz Felisiak 7fa1a93c6c
Refs #28214 -- Added test for escaping JSONField key lookups.
Thanks mrsanders for the report.

Fixed in 7deeabc7c7.
2020-02-05 14:31:30 +01:00
Nick Pope 335c9c94ac Simplified imports from django.db and django.contrib.gis.db. 2020-02-04 13:20:06 +01:00
Simon Charette eb31d84532 Fixed CVE-2020-7471 -- Properly escaped StringAgg(delimiter) parameter. 2020-02-03 08:49:13 +01:00
Mariusz Felisiak a260001a2d
Refs #30943 -- Fixed postgres_tests on PostgreSQL 9.5.
Bloom extension is available on PostgreSQL 9.6+.
2020-01-31 20:42:16 +01:00
Hannes Ljungberg 7edd06a9cf Improved SearchVectorCombinable and SearchQueryCombinable error messages. 2020-01-27 15:09:47 +01:00
David Wobrock 2f565f84ac Fixed #31097 -- Fixed crash of ArrayAgg and StringAgg with filter when used in Subquery. 2019-12-31 10:35:43 +01:00
David Wobrock 7d44aeb388 Refs #31097 -- Added tests for filter in ArrayAgg and StringAgg. 2019-12-31 10:35:39 +01:00