|inspectdb and non "public" schema in postgresql||Fabio Caritas Barrionuevo da Luz||5/19/14 2:38 PM|
Hello Django core developers.
Fábio C. Barrionuevo da Luz
Acadêmico de Sistemas de Informação na Faculdade Católica do Tocantins - FACTO
Palmas - Tocantins - Brasil - América do Sul
|Re: inspectdb and non "public" schema in postgresql||Russell Keith-Magee||5/19/14 5:53 PM|
On Tue, May 20, 2014 at 5:38 AM, Fabio C. Barrionuevo da Luz <bna...@gmail.com> wrote:
Not really - this mailing list is for discussing the development of Django itself, not for solving usage questions.
Well, there's *something* going wrong. inspectdb definitely works if you point it at a PostgreSQL database. I can only assume that either:
a) The "neweposse" and "eposse" databases are actually empty, and don't actually contain schema, or
b) An error is being raised when connecting to the database, which is being silenced incorrectly
If (b) is happening, that would be a bug; you can check if this is the case by running "manage.py dbshell"; if you can't connect a shell to the database, inspectdb won't work either. If dbshell *does* work, then you can run /dt to confirm that tables actually exist in the database.
AFAIK, nothing Marc is doing will change inspectdb functionality.
Russ Magee %-)
|Re: inspectdb and non "public" schema in postgresql||Tomek Paczkowski||5/20/14 1:55 AM|
If I understand correctly, your legacy database is not in "public" schema.
Django offers no support for Postgres schemas, it's left to the developer/ops people to have correct search_path set.
There are two possible fixes for you:
- set Postgres user default search path to contain your schema
- hook into connection_created signal and set search pach manually
|Re: inspectdb and non "public" schema in postgresql||Fabio Caritas Barrionuevo da Luz||5/21/14 10:33 AM|
Tomek, is exactly that.
Russell, results of my tests inside dbshell:
the database that example I used is attached.
inspectdb realy dont work with postgresql schema
I opened the new ticket to handle this: https://code.djangoproject.com/ticket/22673
Checked that this is an old problem of Django.
rapid search about this: