summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/operations.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock2023-04-181-0/+11
| | | | relation on PostgreSQL.
* Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo2022-12-151-23/+67
| | | | | | | 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>
* Refs #33308 -- Added DatabaseOperations.compose_sql() on PostgreSQL.Florian Apolloner2022-12-121-1/+4
|
* Refs #33308 -- Moved psycopg2 imports to the psycopg_any module.Florian Apolloner2022-12-121-3/+1
|
* Refs #33308 -- Used get_db_prep_value() to adapt JSONFields.Simon Charette2022-11-151-0/+14
|
* Fixed #33872 -- Deprecated ↵Mariusz Felisiak2022-08-031-0/+1
| | | | django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField.
* Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.Simon Charette2022-07-061-34/+40
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Removed unneeded code in explain_query_prefix()Tim Graham2022-04-141-1/+1
|
* Fixed CVE-2022-28347 -- Protected QuerySet.explain(**options) against SQL ↵Mariusz Felisiak2022-04-111-8/+23
| | | | injection on PostgreSQL.
* Refs #33517 -- Prevented __second lookup from returning fractional seconds ↵nabil-rady2022-02-221-0/+9
| | | | on PostgreSQL.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-6/+9
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-61/+94
|
* Fixed #31685 -- Added support for updating conflicts to QuerySet.bulk_create().sean_c_hsu2022-01-191-2/+15
| | | | | Thanks Florian Apolloner, Chris Jerdonek, Hannes Ljungberg, Nick Pope, and Mariusz Felisiak for reviews.
* Fixed #33279 -- Fixed handling time zones with "-" sign in names.Can Sarigol2021-11-121-4/+5
| | | | | | Thanks yakimka for the report. Regression in fde9b7d35e4e185903cc14aa587ca870037941b1.
* Fixed #31640 -- Made Trunc() truncate datetimes to Date/TimeField in a ↵David-Wobrock2020-10-141-3/+5
| | | | specific timezone.
* Fixed #31956 -- Fixed crash of ordering by JSONField with a custom decoder ↵Mariusz Felisiak2020-08-281-3/+0
| | | | | | | on PostgreSQL. Thanks Marc Debureaux for the report. Thanks Simon Charette, Nick Pope, and Adam Johnson for reviews.
* Fixed #31731 -- Removed unreachable code for resetting sequences of ↵Ravindar Sharma2020-07-171-15/+0
| | | | | | | | | | | | | | | auto-created m2m tables in sequence_reset_sql(). Unreachable because f.remote_field.through is truthy for all m2m fields. Resetting sequences of auto-created m2m tables in sequence_reset_sql() is also unnecessary: - in sqlsequencereset since c39ec6dccb389fbb4047e44f5247e18bb76ae598 because auto-created tables are included in model_list, - in loaddata because there is no it need to reset sequences for models not loaded directly. - in create_default_site() because it doesn't have m2m fields.
* Stopped adapting DecimalField values to strings on PostgreSQL.Simon Charette2020-07-141-0/+3
| | | | The psycopg2 backend uses the type information to provide type hints.
* Fixed #12990, Refs #27694 -- Added JSONField model field.sage2020-05-081-0/+3
| | | | | | | | | | | 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>
* Fixed #31473 -- Made sql_flush() use RESTART IDENTITY to reset sequences on ↵Jon Dufresne2020-04-171-16/+9
| | | | | | | | | | | | PostgreSQL. The sql_flush() positional argument sequences is replaced by the boolean keyword-only argument reset_sequences. This ensures that the old function signature can't be used by mistake when upgrading Django. When the new argument is True, the sequences of the truncated tables will reset. Using a single boolean value, rather than a list, allows making a binary yes/no choice as to whether to reset all sequences rather than a working on a completely different set.
* Simplified DatabaseOperations.sql_flush() on Oracle and PostgreSQL.Jon Dufresne2020-04-171-20/+20
| | | | Added early return to decrease an indentation level.
* Fixed #31212 -- Updated psycopg links to HTTPS and new location.Jon Dufresne2020-01-291-1/+1
|
* Fixed #31183 -- Added a feature flag for "<db> only supports UNBOUNDED ↵Tim Graham2020-01-201-10/+0
| | | | together with PRECEDING and FOLLOWING".
* Fixed #31133 -- Fixed crash when subtracting against a subquery annotation.Simon Charette2020-01-031-1/+2
| | | | | | | | | The subtract_temporals() database operation was not handling expressions returning SQL params in mixed database types. Regression in 35431298226165986ad07e91f9d3aca721ff38ec. Thanks Reupen Shah for the report.
* Fixed #30821 -- Added ExtractIsoWeekYear database function and iso_week_day ↵Anatol Ulrich2019-10-021-0/+2
| | | | lookup.
* Refs #29444 -- Allowed returning multiple fields from INSERT statements on ↵Johannes Hoppe2019-09-091-6/+13
| | | | | | | PostgreSQL. Thanks Florian Apolloner, Tim Graham, Simon Charette, Nick Pope, and Mariusz Felisiak for reviews.
* Fixed #30661 -- Added models.SmallAutoField.Nick Pope2019-08-021-0/+1
|
* Refs #29444 -- Added support for fetching a returned non-integer insert ↵Johannes Hoppe2019-07-081-1/+1
| | | | | | | values on Oracle. This is currently not actively used, since the ORM will ask the SQL compiler to only return auto fields.
* Fixed #30128 -- Fixed handling timedelta timezone in database functions.can2019-06-131-1/+8
|
* Removed unnecessary /static from links to PostgreSQL docs.Nick Pope2019-03-291-4/+4
|
* Fixed #28649 -- Added ExtractIsoYear database function and iso_year lookup.Sigurd Ljødal2018-08-181-0/+2
|
* Fixed #28668 -- Allowed QuerySet.bulk_create() to ignore insert conflicts.Tom2018-08-031-0/+3
|
* Fixed #29569 -- Fixed Cast() with AutoField and BigAutoField.Mariusz Felisiak2018-07-251-0/+4
|
* Fixed #28574 -- Added QuerySet.explain().Tom2018-04-191-0/+15
|
* Fixed #24747 -- Allowed transforms in QuerySet.order_by() and distinct(*fields).Matthew Wilkes2018-02-101-3/+4
|
* Fixed #28982 -- Simplified code with and/or.Дилян Палаузов2018-01-031-5/+3
|
* Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов2017-12-041-1/+1
|
* Fixed #28702 -- Made query lookups for CIText fields use citext.Mads Jensen2017-11-291-0/+2
|
* Fixed #26608 -- Added support for window expressions (OVER clause).Mads Jensen2017-09-181-0/+10
| | | | | Thanks Josh Smeaton, Mariusz Felisiak, Sergey Fedoseev, Simon Charettes, Adam Chainz/Johnson and Tim Graham for comments and reviews and Jamie Cockburn for initial patch.
* Removed unused DatabaseOperations.last_insert_id() on PostgreSQL.Mariusz Felisiak2017-08-011-7/+0
| | | Unused since 9eb2afddfa0165d69f3e506122c2aa2b68618591.
* Fixed #28371 -- Fixed Cast() with CharField if the max_length argument isn't ↵Mariusz Felisiak2017-07-271-0/+2
| | | | | provided. Thanks Tim Graham for the review.
* Fixed #28038 -- Restored casting to text of builtin lookups on PostgreSQL.Simon Charette2017-04-071-2/+0
| | | | | | | Reverted 658f1e8 which broke code using __icontains's implicit cast to ::text on ArrayField. Thanks Peter J. Farrell for the report.
* Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan2017-02-281-7/+6
|
* Refs #26285 -- Removed postgresql's unused ↵Tim Graham2017-02-211-6/+0
| | | | | | DatabaseOperations.fulltext_search_sql(). Should have been removed in 5139832398624be75ee5361a6fac9348fdb61093.
* Fixed #27856 -- Improved accuracy of date subtraction on PostgreSQL.Vytis Banaitis2017-02-211-1/+1
| | | | Accuracy was incorrect when dates differ by a month or more.
* Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham2017-02-091-1/+1
|
* Fixed #27802 -- Unified return value of db backend datetime SQL methods.Mariusz Felisiak2017-02-061-17/+10
|
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-1/+1
|
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-2/+0
|
* Updated postgresql.org links to https and made them canonical.Marti Raudsepp2016-10-251-4/+4
|