0

Does a reverse sql inspector exist for django & postgres? Something that shows you what is the origin of the sql view in django?

Something like this: https://github.com/rory/django-sql-inspector, but for postgres.

(Please let me know if you don't know of one, because hearing a handful of respectable peeps say they haven't is better than silence.)

jackiekazil
  • 5,696
  • 4
  • 21
  • 20

1 Answers1

0

I can suggest django-sql-stacktrace, "github.com/adw0rd/django-sql-stacktrace";. Beside this django.backend.db logger that you can configure in the setting along with django.request logger to inspect the sql trace. Here there is a sample logging: configuration:docs.djangoproject.com/en/1.5/topics/logging/…. I hope this can be helpful.

Bradia
  • 827
  • 5
  • 8
  • Thank you for your response. I am familiar with '.query', but it doesn't quite suit my need. I am looking more for a way to identify where the sql is coming from -- so I identify the sql and having it point me to the origin. Suggestions? – jackiekazil Dec 01 '13 at 02:00
  • I see what you mean. I can suggest django-sql-stacktrace, "https://github.com/adw0rd/django-sql-stacktrace". Beside this django.backend.db logger that you can configure in the setting along with django.request logger to inspect the sql trace. Here there is a sample logging: configuration:https://docs.djangoproject.com/en/1.5/topics/logging/#configuring-logging. I hope this can be helpful. – Bradia Dec 01 '13 at 02:34
  • thank you for that. That looks like what it will serve my need! (Can you edit your original post to include what is in your comment?) – jackiekazil Dec 03 '13 at 21:28