#28774: Use only a specific database schema instead of 'public' one (like in
Postgresql)
-------------------------------------+-------------------------------------
               Reporter:  Riccardo   |          Owner:  nobody
  Campisano                          |
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Database   |        Version:  1.8
  layer (models, ORM)                |       Keywords:  django, orm,
               Severity:  Normal     |  database, postgresql, schema
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Hello,

 In our project (https://github.com/desihub/qlf) we should use a PostgreSQL
 database used by others application, so that we want to configure Django
 ORM to use just a specific schema.

 I cannot find such kind of configurations in the official documentation. A
 tip for a kind of such configuration is available in

   https://www.amvtek.com/blog/posts/2014/Jun/13/accessing-multiple-
 postgres-schemas-from-django/

 and it appears to work, using a specific config like that

 {{{
 DATABASES = {
     'default': {
         'ENGINE': 'django.db.backends.postgresql_psycopg2',
         'OPTIONS': {
             'options': '-c search_path=qlf_schema'
         },
     },
 }}}

 However, I would be sure that this is the correct (official, supported)
 way to do such thing, and that will be supported in the future (and that
 this is not a workaround that currently work but can break in a next
 version of Django).

 Thanks,
 Riccardo

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28774>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.8fa884811c948e209f88ba730c83a658%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to