summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/base.py
AgeCommit message (Collapse)Author
2019-02-20[2.2.x] Fixed #30193, Refs #28478 -- Avoided PostgreSQL connection health ↵Simon Charette
checks on initialization. This addressed a regression introduced by a96b9019320ed8236659ee520a7a017c1bafbc6f as identified by Ran Benita. Backport of 7071f8f2729295b0da77b6c651966dc32c71f1ab from master
2019-02-14[2.2.x] Fixed #30171 -- Fixed DatabaseError in servers tests.Jon Dufresne
Made DatabaseWrapper thread sharing logic reentrant. Used a reference counting like scheme to allow nested uses. The error appeared after 8c775391b78b2a4a2b57c5e89ed4888f36aada4b. Backport of 76990cbbda5d93fda560c8a5ab019860f7efaab7 from master.
2019-01-14Refs #28478 -- Prevented timezone assignment for unusable PostgreSQL ↵Simon Charette
connections.
2018-11-01Fixed #29886 -- Fixed unaccent lookup when PostgreSQL's ↵Jayantha Gumballi
standard_conforming_strings option is off. Thanks Tom McClure for the patch.
2018-08-17Refs #29015 -- Added database name to PostgreSQL database name too long ↵Jon Dufresne
exception.
2018-04-27Fixed #29015 -- Added an exception if the PostgreSQL database name is too long.priyanshsaxena
2018-04-03Refs #24791 -- Made PostgreSQL's nodb connection use first PostgresSQL db ↵Mariusz Felisiak
when 'postgres' db isn't available. Thanks Tim Graham and Claude Paroz for reviews.
2018-03-16Fixed hanging indentation in various code.Mariusz Felisiak
2017-12-11Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope
2017-09-06Removed DatabaseWrapper.psycopg2_version.Sergey Fedoseev
Unused since 3adc5f1ee6618a615db07d4a868b366a15c39f82.
2017-09-05Removed unneeded __init__() in PostgreSQL DatabaseWrapper.Mads Jensen
2017-06-13Fixed #27830 -- Used distutils.version.LooseVersion for version parsing.chillaranand
2017-05-23Refs #27859 -- Added DatabaseWrapper.display_name.Mariusz Felisiak
Thanks Tim Graham for the review.
2017-03-21Fixed #27966 -- Bumped required psycopg2 version to 2.5.4.Mariusz Felisiak
Thanks Tim Graham for the review.
2017-03-01Removed PostgreSQL version detection for psycopg2 < 2.0.12.Tim Graham
2017-02-28Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan
2017-01-30Refs #23919 -- Removed usage of obsolete SafeBytes classClaude Paroz
The class will be removed as part of #27753. Thanks Tim Graham for the review.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-20Refs #23919 -- Removed unneeded force_str callsClaude Paroz
2017-01-18Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-17Refs #26154 -- Removed deprecated CommaSeparatedIntegerField.Tim Graham
2017-01-16Refs #16614 -- Called _prepare_cursor() on every created cursor.François Freitag
2017-01-11Refs #16614 -- Made QuerySet.iterator() use server-side cursors on PostgreSQL.François Freitag
Thanks to Josh Smeaton for the idea of implementing server-side cursors in PostgreSQL from the iterator method, and Anssi Kääriäinen and Kevin Turner for their previous work. Also Simon Charette and Tim Graham for review.
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-09-26Removed DatabaseError and IntegrityError declarations from database backends.Adam Chainz
Unused since 11ee9746a0530ec38f523fb4de44950d9b783877.
2016-09-08Fixed #27170 -- Added DatabaseWrapper class attributes to ease subclassing.Chris Jerdonek
2016-08-15Removed unnecessary registration of psycopg2 unicode extensions on Python 3Claude Paroz
2016-06-06Fixed #26712 -- Avoided unnecessary SET TIMEZONE queries on PostgreSQL.Simon Charette
A change of the USE_TZ or TIME_ZONE settings doesn't necessarily require a change to the active connections' timezones.
2016-04-04Fixed E402 flake8 warnings.Tim Graham
2016-02-08Fixed #26177 -- Fixed a PostgreSQL crash with TIME_ZONE=None and USE_TZ=False.Tim Graham
2015-12-25Fixed #14286 -- Added models.BigAutoField.Alexander Sosnovskiy
2015-09-11Fixed #25329 -- Prevented _nodb_connection from being left openAdam Chainz
2015-08-07Fixed #25175 -- Renamed the postgresql_psycopg2 database backend to postgresql.Caio Ariede
2011-04-02Deprecated the psycopg-based postgresql database backend.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-09Fixed #7539, #13067 -- Added on_delete argument to ForeignKey to control ↵Carl Meyer
cascade behavior. Also refactored deletion for efficiency and code clarity. Many thanks to Johannes Dollinger and Michael Glassford for extensive work on the patch, and to Alex Gaynor, Russell Keith-Magee, and Jacob Kaplan-Moss for review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23Fixed #14223 -- Extended unification of exception raised in presence of ↵Ramiro Morales
integrity constraint violations. The unification had been introduced in r12352 and native backend exceptions still slipped through in cases that end in connection.commit() call. Thanks Alex, Jacob and Carl for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to ↵Russell Keith-Magee
DeprecationWarnings, and removed 1.1 deprecated code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-30Fixed #13798 -- Added connection argument to the connection_created signal. ↵Russell Keith-Magee
Thanks to liangent for the report, and Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-25Fixed #12766 -- Only set the psycopg1 client encoding when the connection is ↵Russell Keith-Magee
first created. This allows the custom_pk test to pass under psycopg1. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-25Fixed #12759 -- Fixed the iterator method on psycopg1 cursors, which was ↵Russell Keith-Magee
preventing the raw_query tests from passing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-26Corrected an edge case introduced in r12602. Thanks to Ramiro Morales for ↵Russell Keith-Magee
the eagle eyes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-26Fixed #1480 -- Added the ability to use the system timezone. Thanks to ↵Russell Keith-Magee
Ramiro Morales for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23No, really this time -- corrected the warning message from r12510.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Cleaned up the warning message introduced by r12510.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Fixed #12912 -- Placed the psycopg1-backed ``postgresql`` database backend ↵Russell Keith-Magee
on the deprecation path. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-03Fixed a regression in the Postgres psycopg cursor handling introduced by ↵Russell Keith-Magee
r12352. Thanks to Kenneth Gonsalves for the report, and Karen for the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-30Fixed #12732 -- Corrected an argument naming problem introduced by r12532. ↵Russell Keith-Magee
Thanks to stevedegrace for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29Fixed #12702 -- Introduced a common implementation of DatabaseError and ↵Russell Keith-Magee
IntegrityError, so that database backends can (re)raise common error classes. Thanks for Waldemar Kornewald for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22Fixed #1142 -- Added multiple database support.Russell Keith-Magee
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37