Fixed #34200 -- Made the session role configurable on PostgreSQL.

This commit is contained in:
Mike Crute 2022-12-05 20:26:37 -08:00 committed by Mariusz Felisiak
parent 2a14b8df39
commit 0b78ac3fc7
4 changed files with 63 additions and 6 deletions

View file

@ -230,6 +230,27 @@ configuration in :setting:`DATABASES`::
``IsolationLevel`` was added.
.. _database-role:
Role
----
.. versionadded:: 4.2
If you need to use a different role for database connections than the role use
to establish the connection, set it in the :setting:`OPTIONS` part of your
database configuration in :setting:`DATABASES`::
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
# ...
"OPTIONS": {
"assume_role": "my_application_role",
},
},
}
Indexes for ``varchar`` and ``text`` columns
--------------------------------------------