#29501: Add support for ./manage.py dbshell -c SQL
-------------------------------------+-------------------------------------
Reporter: Artem Skoretskiy | Owner: (none)
Type: New feature | Status: new
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Artem Skoretskiy):
No progress AKAIK.
Maybe it would be easier to call database-specific CLI tool with right
parameters than run cursor.
Pros:
* No need to care about printing results (user could execute SELECT)
* Could run commands that are unique for the CLI (e.g. \dt to show tables
in psql)
Cons:
* Each backend would need its own command to run (but we already have
dbshell, so we know name of binary; just need a parameter to execute a
query).
* Each backend would show results in its own format, so you cannot e. g.
save result as cab file)
Another completely different approach would be to pass all command line
arguments provided to dbshell, e.g. after “—“ divider to database CLI app.
For example:
{{{
./manage.py dbshell — -c “select * from auth_user”
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29501#comment:7>
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/065.dd339b1cd2431d4783ce529542780085%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.