Missing documentation for setting libpq options with the PostgreSQL backend
As far as I can see, when a database uses the django.db.backends.postgresql
engine, any options from the OPTIONS
key that are not recognized by the engine itself are passed directly to the underlying libpq library. This way you can set options like `sslmode`.
But this doesn't seem to actually be documented anywhere, so it's unclear whether this is actually a supported feature or just an implementation artifact.
If this really is supported, then it should be documented - presumably in PostgreSQL notes.
PR #17586 to fix this: https://github.com/django/django/pull/17586
Change History
(7)
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Uncategorized → Cleanup/optimization
|
Owner: |
changed from nobody to Yashas Donthi
|
Status: |
new → assigned
|
Description: |
modified (diff)
|
Has patch: |
set
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
This vary depending on your database backend (as documented), but I agree that it's worth mentioning that the PostgreSQL backend passes the content of OPTIONS as keyword arguments to the connection constructor, allowing for more advanced control of driver behavior.
Would you like to prepare a patch?