Commit Graph

54 Commits

Author SHA1 Message Date
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
Nick Pope e76f9d5b44 Refs #32943 -- Added support for covering SP-GiST indexes on PostgreSQL 14+. 2021-10-01 13:11:34 +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
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
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 1d650ad019 Refs #32096 -- Added test for ArrayAgg over JSONField key transforms. 2020-10-14 20:56:04 +02:00
Mariusz Felisiak 88af11c58b
Refs #27996 -- Fixed postgres_tests crash if not running with PostgreSQL. 2020-07-31 12:38:09 +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
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
Baptiste Mispelon 3baf92cf82 Fixed #31340 -- Allowed query expressions in SearchQuery.value and __search lookup. 2020-03-16 10:27:23 +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
Hasan Ramezani 5d674eac87 Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField. 2019-12-05 15:50:39 +01:00
Nick Pope 02983c5242 Fixed #30943 -- Added BloomIndex to django.contrib.postgres. 2019-11-07 11:23:53 +01:00
Hasan Ramezani 8463390527 Refs #27808 -- Added test for saving nested ArrayField with nullable base field. 2019-11-01 15:56:21 +01:00
Mads Jensen a3417282ac Fixed #29824 -- Added support for database exclusion constraints on PostgreSQL.
Thanks to Nick Pope and Mariusz Felisiak for review.

Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-07-16 18:04:41 +02:00
Mariusz Felisiak 7991111af1
Fixed #30621 -- Fixed crash of __contains lookup for Date/DateTimeRangeField when the right hand side is the same type.
Thanks Tilman Koschnick for the report and initial patch.
Thanks Carlton Gibson the review.

Regression in 6b048b364c.
2019-07-10 10:33:36 +02:00
Vinay Karanam 5a36c81f58 Fixed #29391 -- Made PostgresSimpleLookup respect Field.get_db_prep_value(). 2019-02-09 18:05:50 -05:00
Stefano Chiodino 6de7f9ec60 Fixed #29598 -- Deprecated FloatRangeField in favor of DecimalRangeField. 2018-10-02 19:17:23 -04:00
Tom Forbes 9cbdb44014 Fixed #23646 -- Added QuerySet.bulk_update() to efficiently update many models. 2018-09-18 16:14:44 -04:00
vinay karanam 3af695eda2 Fixed #28291, #24726 -- Fixed ArrayField with JSONField and RangeFields. 2018-07-27 11:35:54 -04:00
Tim Graham 5fa4f40f45 Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Tim Graham 1d8cfa3608 Fixed #28626 -- Dropped support for PostgreSQL 9.3.
Thanks Simon Charette for the introspection changes.
2017-09-27 11:00:04 -04:00
Mads Jensen f4135783ad Fixed #28126 -- Added GistIndex to contrib.postgres.
Thanks to Marc Tamlyn for the initial patch.
2017-09-04 21:08:02 -04:00
Simon Charette b91868507a Fixed #28161 -- Fixed return type of ArrayField(CITextField()).
Thanks Tim for the review.
2017-05-04 00:02:14 -04:00
Simon Charette f37467ec7a Added a test for ArrayField(HStoreField()). 2017-05-03 23:53:08 -04:00
Paolo Melchiorre fcb5dbfec0 Fixed #27996 -- Added RandomUUID function and CryptoExtension to contrib.postgres. 2017-04-25 20:21:36 -04:00
Paolo Melchiorre a78fd2abd4 Alphabetized CITextExtension in test migration. 2017-04-25 19:32:39 -04:00
Mads Jensen fb5bd38e3b Refs #26610 -- Added CIText mixin and CIChar/Email/TextField. 2017-02-11 07:16:35 -05:00
Tim Graham 7aba69145d Refs #23919 -- Removed django.test.mock Python 2 compatibility shim. 2017-01-20 08:17:20 -05:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Mads Jensen 094d630ae8 Fixed #26610 -- Added CITextField to contrib.postgres. 2016-09-21 12:11:37 -04:00
Simon Charette 32c0d823e5 Used a database feature to prevent the jsonb test model from being migrated.
Thanks Tim for the review.
2016-09-12 20:07:35 -04:00
Claude Paroz 13c3e5d5a0 Fixed #25995 -- Added an encoder option to JSONField
Thanks Berker Peksag and Tim Graham for the reviews.
2016-08-25 21:42:42 +02:00
Akshesh 236baa0f0e Refs #27030 -- Added BtreeGinExtension operation. 2016-08-12 18:37:00 -04:00
Tim Graham ea34426ae7 Fixed flake8 2.6 warnings. 2016-06-16 09:12:50 -04:00
Matthew Somerville 1962a96a30 Fixed #24938 -- Added PostgreSQL trigram support. 2016-05-13 12:38:21 -04:00
Conrad Kramer c112198332 Fixed #26542 -- Fixed quoting in CreateExtension operation. 2016-04-27 09:30:55 -04:00
Marc Tamlyn 2d877da855 Refs #3254 -- Added full text search to contrib.postgres.
Adds a reasonably feature complete implementation of full text search
using the built in PostgreSQL engine. It uses public APIs from
Expression and Lookup.

With thanks to Tim Graham, Simon Charettes, Josh Smeaton, Mikey Ariel
and many others for their advice and review. Particular thanks also go
to the supporters of the contrib.postgres kickstarter.
2016-04-22 10:44:37 +01:00
Fernando Miranda 2495023a4c Fixed #25143 -- Added ArrayField.from_db_value().
Thanks Karan Lyons for contributing to the patch.
2016-03-12 09:14:35 -05:00
Tim Graham 36f1f5cfb0 Refs #25979 -- Dropped compatiblity for running tests on PostgreSQL < 9.2. 2016-02-12 09:59:13 -05:00
Flavio Curella c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Adam Chainz d34d39ade7 Fixed #24894 -- Added contrib.postgres.functions.TransactionNow 2015-06-15 14:03:17 -04:00
Marc Tamlyn 7bda2d8ebc Fixed #24837 -- field__contained_by=Range
Provide `contained_by` lookups for the equivalent single valued fields
related to the range field types. This acts as the opposite direction to
rangefield__contains.

With thanks to schinckel for the idea and initial tests.
2015-06-04 19:29:59 +01:00
Marc Tamlyn 33ea472f69 Fixed #24604 -- Added JSONField to contrib.postgres. 2015-05-30 23:10:30 +01:00
Claude Paroz 36e90d1f45 Stopped special-casing postgres-specific tests
Refs #23879.
2015-04-18 15:17:49 +02:00
Andriy Sokolovskiy e4cf8c8420 Fixed #24301 -- Added PostgreSQL-specific aggregate functions 2015-03-30 10:44:37 -04:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Marc Tamlyn 39d95fb6ad Fixed #24092 -- Widened base field support for ArrayField.
Several issues resolved here, following from a report that a base_field
of GenericIpAddressField was failing.

We were using get_prep_value instead of get_db_prep_value in ArrayField
which was bypassing any extra modifications to the value being made in
the base field's get_db_prep_value. Changing this broke datetime
support, so the postgres backend has gained the relevant operation
methods to send dates/times/datetimes directly to the db backend instead
of casting them to strings. Similarly, a new database feature has been
added allowing the uuid to be passed directly to the backend, as we do
with timedeltas.

On the other side, psycopg2 expects an Inet() instance for IP address
fields, so we add a value_to_db_ipaddress method to wrap the strings on
postgres. We also have to manually add a database adapter to psycopg2,
as we do not wish to use the built in adapter which would turn
everything into Inet() instances.

Thanks to smclenithan for the report.
2015-01-16 16:15:16 -05:00