#31463: apply OPTIONS in database settings to dbshell
-------------------------------------+-------------------------------------
     Reporter:  Dulmandakh           |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Dulmandakh:

Old description:

> When I use django.db.backends.postgresql, and set OPTIONS like below, it
> would apply to psycopg2 connections, but not dbshell.
> {{{
> DATABASES = {
>     "default": {
>         "ENGINE": "django.db.backends.postgresql",
>         "NAME": "db",
>         "HOST": "127.0.0.1",
>         "OPTIONS": {"options": "-c default_text_search_config=simple"}
>     }
> }
> }}}
>
> Entering below command in dbshell would show pg_catalog.english instead
> of pg_catalog.simple.
> {{{
> SHOW default_text_search_config;
> }}}
>

> https://github.com/django/django/pull/12715

New description:

 When I use django.db.backends.postgresql, and set OPTIONS like below, it
 would apply to psycopg2 connections, but not dbshell. Developers expect
 that DB connection configuration would apply in all cases.

 {{{
 DATABASES = {
     "default": {
         "ENGINE": "django.db.backends.postgresql",
         "NAME": "db",
         "HOST": "127.0.0.1",
         "OPTIONS": {"options": "-c default_text_search_config=simple"}
     }
 }
 }}}

 Entering below command in dbshell would show pg_catalog.english instead of
 pg_catalog.simple.
 {{{
 SHOW default_text_search_config;
 }}}


 https://github.com/django/django/pull/12715

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31463#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.3f92500bcbff397ac990f8cfa8729dd5%40djangoproject.com.

Reply via email to