summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/creation.py
AgeCommit message (Collapse)Author
2024-03-01Refs #33497 -- Added connection pool support for PostgreSQL.Sarah Boyce
Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Ran Benita <ran@unusedvar.com>
2023-04-03Prevented PostgreSQL's DatabaseCreation._execute_create_test_db() from ↵Tim Graham
hiding clause-less exceptions. Regression in 3cafb783f3f711c7413ba2b8d7c8ff750bd4d6e1.
2022-12-12Refs #33308 -- Moved psycopg2 imports to the psycopg_any module.Florian Apolloner
2022-12-01Refs #33308 -- Used psycopg's errors instead of errorcodes.Florian Apolloner
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-07-05Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".Mateo Radman
2020-02-06Refs #31233 -- Changed DatabaseWrapper._nodb_connection to _nodb_cursor().Jon Dufresne
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-01-20Changed re-raising an exception to use bare raise syntax where appropriate.Jon Dufresne
2019-02-13Fixed #30184 -- Removed ellipsis characters from shell output strings.Dan Davis
Partially reverted 50b8493581fea3d7137dd8db33bac7008868d23a (refs #29654) to avoid a crash when the user shell doesn't support non-ASCII characters.
2018-10-24Fixed F841 flake8 warning.Mariusz Felisiak
2018-08-22Refs #29654 -- Replaced three dots with ellipsis character in output strings.Claude Paroz
2018-08-03Fixed #29613 -- Fixed --keepdb on PostgreSQL if the database exists and the ↵Mariusz Felisiak
user can't create databases. Regression in e776dd2db677d58dcb50aea20d3bb191537df25b. Thanks Tim Graham for the review.
2018-07-19Fixed #29040 -- Made test database creation messages use a consistent output ↵Claude Paroz
stream.
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2017-09-11Fixed #28578 -- Renamed DatabaseCreation number arguments to suffix.Jon Dufresne
2017-04-25Fixed #28116 -- Used error code filtering in PostgreSQL test database creation.Mariusz Felisiak
Thanks Claude Paroz and Tim Graham for reviews.
2017-04-10Fixed #25406 -- Removed exception hiding in PostgreSQL test database ↵Mariusz Felisiak
creation during --keepdb. Thanks Markus Holtermann and Tim Graham for reviews.
2017-01-25Removed unused variables that are overwritten.Mads Jensen
2016-08-23Fixed #27061 -- Added a TEST['TEMPLATE'] setting for PostgreSQL.Chris Jerdonek
2015-11-13Refs #25196 -- Fixed incorrect argument order in test database creation.Tim Graham
2015-09-25Fixed #25196 -- Normalized database representations in test database messages.Ville Skyttä
Left over Oracle mostly as-is since it's more complicated.
2015-09-09Cloned databases for running tests in parallel.Aymeric Augustin
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-07-30Fixed #13773 -- Passed in the current connection in a call to db_type(). ↵Russell Keith-Magee
Thanks to Suor for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-21Fixed #8901 -- Reapplied r13328 (with extra docs) now that we have a 1.3 ↵Russell Keith-Magee
development branch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-10Refs #8901 -- Reverted r13328 because the patch imposes a minimum version ↵Russell Keith-Magee
requirement of Postgres 8.0; we can't impose that on Django 1.2, so we need to wait until the 1.3 is branched before we can apply this change. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-07Fixed #8901 -- Corrected the PostgreSQL sequence reset code when field ↵Russell Keith-Magee
identifiers exceed the maximum identifier length. Thanks to adam@zuerchertech.com for the report, and Matt Hoskins for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13328 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
2009-12-19Fixed #12234 -- Create additional indexes that use the appropriate operation ↵Justin Bronn
class for PostgreSQL `varchar` and `text` columns when `db_index=True`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11912 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17Fixed #399: Added big integer field. Thanks to Tomáš Kopeček for ↵Karen Tracey
persistently maintaining a patch for this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01Fixed #8210 and #8664: moved `USStateField` and `PhoneNumberField` to ↵Jacob Kaplan-Moss
`django.contrib.localflavor.us`. This is a backwards-incompatible change, albeit a minor one; just add an aditional `import` and go on your way. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11Fixed #5461 -- Refactored the database backend code to use classes for the ↵Russell Keith-Magee
creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18Fixed #7805 -- Removed ImageField.get_internal_type() because it doesn't ↵Adrian Holovaty
offer anything beyond FileField's implementation. Thanks, Gulopine git-svn-id: http://code.djangoproject.com/svn/django/trunk@7947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-19Fixed #231: all fields that should take max_length now do. Thanks, Don ↵Jacob Kaplan-Moss
Spaulding. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms ↵Gary Wilson Jr
`FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20Added a db_type() method to the database Field class. This is a hook for ↵Adrian Holovaty
calculating the database column type for a given Field. Also converted all management.py CREATE TABLE statements to use db_type(), which made that code cleaner. The Field.get_internal_type() hook still exists, but we should consider removing it at some point, because db_type() is more general. Also added docs -- the beginnings of docs on how to create custom database Field classes. This is backwards-compatible. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-21Fixed #2365, #3324 -- Renamed FloatField to DecimalField and changed the codeMalcolm Tredinnick
to return Decimal instances in Python for this field. Backwards incompatible change. Added a real FloatField (stores floats in the database) and support for FloatField and DecimalField in newforms (analogous to IntegerField). Included decimal.py module (as django.utils._decimal) from Python 2.4. This is license compatible with Django and included for Python 2.3 compatibility only. Large portions of this work are based on patches from Andy Durdin and Jorge Gajon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-08Fixed #1477: URLFields now accept a maxlength parameter. Thanks, Matt Croydon.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty
backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37