#22673: inspectdb not support database schema on postgresql with name different
of
"public"
-------------------------------------+-------------------------------------
Reporter: Fabio Caritas | Owner: nobody
Barrionuevo da Luz <bnafta@…> |
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: inspectdb, | Triage Stage: Accepted
introspection, postgresql, schema |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jaap Vermeulen):
With a simple code change, schemas in postgres work fine (but not for
inspectdb). I will paste the change here and if I find time later on will
create a pull request and also add the second change in there (from
#27908) for inspectdb. In db/backends/postgresql/operations.py replace
the following method:
{{{
def quote_name(self, name):
if name.startswith('"') and name.endswith('"'):
return name # Quoting once is enough.
# Quote schema and db seperately
parts = name.split('.')
return '"' + '"."'.join(parts) + '"'
}}}
If and when I have time, I'll see if I can look at the other DBs.
--
Ticket URL: <https://code.djangoproject.com/ticket/22673#comment:9>
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/109.0a3a221a6819ce5ca9ea77ca3cb59f25%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.