mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #34200 -- Made the session role configurable on PostgreSQL.
This commit is contained in:
parent
2a14b8df39
commit
0b78ac3fc7
4 changed files with 63 additions and 6 deletions
|
@ -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
|
||||
--------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue