summaryrefslogtreecommitdiff
path: root/docs/ref/databases.txt
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2022-12-05 20:26:37 -0800
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-03 09:30:53 +0100
commit0b78ac3fc7bd9f0c57518d0c1a153582318edd59 (patch)
tree75e44e6158f91dd1ade63c7d9a2aac9e34fb78d7 /docs/ref/databases.txt
parent2a14b8df39b573124ea42dec0ce96147c8e767d4 (diff)
Fixed #34200 -- Made the session role configurable on PostgreSQL.
Diffstat (limited to 'docs/ref/databases.txt')
-rw-r--r--docs/ref/databases.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index d62adbe832..ee573c5f65 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -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
--------------------------------------------