From 0b78ac3fc7bd9f0c57518d0c1a153582318edd59 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Mon, 5 Dec 2022 20:26:37 -0800 Subject: Fixed #34200 -- Made the session role configurable on PostgreSQL. --- docs/ref/databases.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'docs/ref') 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 -------------------------------------------- -- cgit v1.3