Mariusz Felisiak
b5f60ef5a7
[4.0.x] Refs #32355 -- Bumped required psycopg2 version to 2.8.4.
...
psycopg2 2.8.4 is the first release to support Python 3.8.
Backport of ca04659b4b
from main
2021-12-22 20:33:49 +01:00
Can Sarigol
d54aa49a7d
[4.0.x] Fixed #33279 -- Fixed handling time zones with "-" sign in names.
...
Thanks yakimka for the report.
Regression in fde9b7d35e
.
Backport of 661316b066
from main.
2021-11-12 11:14:08 +01:00
Daniel Hahler
81bb0ae221
[4.0.x] Fixed #33160 -- Avoided suppressing query errors in _nodb_cursor() on PostgreSQL.
...
Backport of 98c8bf1cee
from main
2021-10-01 07:24:45 +02:00
Tim Graham
022d29c934
Refs #10929 -- Allowed NowUTC SQL customization for third-party backends.
2021-08-24 08:28:03 +02:00
Mateo Radman
2231429991
Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".
2021-07-05 13:31:03 +02:00
Konstantin Alekseev
6e742dabc9
Fixed #32687 -- Restored passing process’ environment to underlying tool in dbshell on PostgreSQL.
...
Regression in bbe6fbb876
.
2021-04-27 10:43:35 +02:00
Hasan Ramezani
8380fe08a0
Fixed #32456 -- Added dbshell support for specifying a password file on PostgreSQL.
2021-03-01 09:33:49 +01:00
Mariusz Felisiak
8908846444
Refs #32292 -- Made dbshell do not use 'postgres' database when service name is set.
...
Regression in dcb3ad3319
.
2021-02-26 20:53:01 +01:00
Mariusz Felisiak
ec0ff40631
Fixed #32355 -- Dropped support for Python 3.6 and 3.7
2021-02-10 10:20:54 +01:00
Mariusz Felisiak
f131841c60
Fixed #32403 -- Fixed re-raising DatabaseErrors when using only 'postgres' database.
...
Thanks Kazantcev Andrey for the report.
Regression in f48f671223
.
2021-02-02 21:34:36 +01:00
Hasan Ramezani
dcb3ad3319
Fixed #32292 -- Added support for connection by service name to PostgreSQL.
2021-01-20 17:30:37 +01:00
Mariusz Felisiak
5371342ed6
Fixed #32357 -- Dropped support for PostgreSQL 9.6 and PostGIS 2.3.
2021-01-19 12:25:20 +01:00
Mariusz Felisiak
d992f4e3c2
Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.
2021-01-14 17:50:04 +01:00
Hannes Ljungberg
ffe756d624
Refs #26167 -- Changed default value of DatabaseFeatures.supports_expression_indexes to True.
2021-01-14 08:32:26 +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
Hannes Ljungberg
d23cb83c99
Refs #26167 -- Made DatabaseSchemaEditor._create_index_sql()'s fields argument optional and kwarg-only.
2020-12-23 11:16:13 +01:00
Hasan Ramezani
275dd4ebba
Fixed #32178 -- Allowed database backends to skip tests and mark expected failures.
...
Co-authored-by: Tim Graham <timograham@gmail.com>
2020-12-10 18:00:57 +01:00
Seamus Quinn
9f72b0970d
Fixed #32201 -- Removed obsolete isort:skip's.
...
Obsolete as of isort 5.
2020-11-19 06:35:41 +01:00
Simon Charette
bbe6fbb876
Refs #32061 -- Unified DatabaseClient.runshell() in db backends.
2020-10-29 22:22:58 +01:00
Tom Carrick
f5e07601b2
Fixed #32046 -- Added CreateCollation/RemoveCollation operations for PostgreSQL.
2020-10-21 10:53:44 +02:00
David-Wobrock
ee005328c8
Fixed #31640 -- Made Trunc() truncate datetimes to Date/TimeField in a specific timezone.
2020-10-14 20:06:26 +02:00
Mariusz Felisiak
999cddd58d
Fixed #32073 -- Skipped collation tests on PostgreSQL < 10.
...
PostgreSQL < 10 doesn't support ICU collations.
Thanks Hannes Ljungberg for the report.
2020-10-06 12:51:35 +02:00
Tom Carrick
e387f191f7
Fixed #31777 -- Added support for database collations to Char/TextFields.
...
Thanks Simon Charette and Mariusz Felisiak for reviews.
2020-09-21 18:24:56 +02:00
Tom Carrick
278b6187d2
Refs #21181 -- Corrected DatabaseFeatures.test_collations for Swedish collation.
...
Previously, backends used different keys "swedish-ci" or "swedish_ci".
2020-09-18 12:15:46 +02:00
Tim Graham
7f2392981d
Added DatabaseIntrospection.index_default_access_method hook on the PostgreSQL backend.
...
This hook is for the CockroachDB backend where the name is 'prefix'.
2020-09-15 07:38:50 +02:00
Mariusz Felisiak
0be51d2226
Fixed #31956 -- Fixed crash of ordering by JSONField with a custom decoder on PostgreSQL.
...
Thanks Marc Debureaux for the report.
Thanks Simon Charette, Nick Pope, and Adam Johnson for reviews.
2020-08-28 19:09:46 +02:00
Tim Graham
ea880ec233
Fixed #24533 -- Dropped PostgreSQL sequence and Oracle identity when migrating away from AutoField.
2020-08-24 14:32:07 +02:00
Tom Carrick
63300f7e68
Fixed #21181 -- Added Collate database function.
...
Thanks Simon Charette for reviews.
2020-08-11 22:21:08 +02:00
Tim Graham
184a6eebb0
Refs #31829 -- Added DatabaseFeatures.json_key_contains_list_matching_requires_list.
...
CockroachDB's behavior matches PostgreSQL.
2020-07-30 06:38:02 +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
f4e93919e4
Fixed #31815 -- Fixed schema value encoding on PostgreSQL.
2020-07-27 06:39:02 +02:00
Ravindar Sharma
18d4eac7fc
Fixed #31731 -- Removed unreachable code for resetting sequences of 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 c39ec6dccb
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.
2020-07-17 08:16:32 +02:00
Simon Charette
9c5c9bd709
Stopped adapting DecimalField values to strings on PostgreSQL.
...
The psycopg2 backend uses the type information to provide type hints.
2020-07-14 07:40:10 +02:00
Simon Charette
2e8941b6f9
Fixed #31735 -- Fixed migrations crash on namespaced inline FK addition on PostgreSQL.
...
The namespace of the constraint must be included when making the
constraint immediate.
Regression in 22ce5d0031
.
Thanks Rodrigo Estevao for the report.
2020-06-24 08:37:20 +02:00
Hannes Ljungberg
8c7992f658
Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.
2020-06-04 12:26:22 +02:00
Hasan Ramezani
e198beadad
Fixed #31630 -- Replaced introspection features with DatabaseFeatures.introspected_field_types.
2020-06-04 08:27:42 +02:00
Manuel Weitzman
a4e6030904
Fixed #30375 -- Added FOR NO KEY UPDATE support to QuerySet.select_for_update() on PostgreSQL.
2020-05-21 10:51:10 +02:00
Tim Graham
f59a2b7306
Refs #12990 -- Added DatabaseFeatures.has_json_operators.
...
CockroachDB also has them.
2020-05-18 08:12:20 +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
Ian Foote
c226c6cb32
Fixed #20581 -- Added support for deferrable unique constraints.
2020-04-30 10:43:50 +02:00
Jon Dufresne
75410228df
Fixed #31473 -- Made sql_flush() use RESTART IDENTITY to reset sequences on 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.
2020-04-17 11:57:24 +02:00
Jon Dufresne
8005829bb9
Simplified DatabaseOperations.sql_flush() on Oracle and PostgreSQL.
...
Added early return to decrease an indentation level.
2020-04-17 10:46:19 +02:00
Adam Johnson
5b884d45ac
Fixed #29501 -- Allowed dbshell to pass options to underlying tool.
2020-04-14 14:02:51 +01:00
Jon Dufresne
3259983f56
Fixed #31233 -- Closed database connections and cursors after use.
2020-02-06 15:35:23 +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
Nick Pope
335c9c94ac
Simplified imports from django.db and django.contrib.gis.db.
2020-02-04 13:20:06 +01:00
Jon Dufresne
958977f662
Fixed #31212 -- Updated psycopg links to HTTPS and new location.
2020-01-29 06:25:40 +01:00
Tim Graham
227d0c7365
Fixed #31183 -- Added a feature flag for "<db> only supports UNBOUNDED together with PRECEDING and FOLLOWING".
2020-01-20 20:03:35 +01:00
Jon Dufresne
26be703fe6
Changed re-raising an exception to use bare raise syntax where appropriate.
2020-01-20 11:44:28 +01:00