#31458 closed New feature (wontfix)
Allow changing executable_name for dbshell management command.
Reported by: | minusf | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | 3.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This is a proof of concept to make the dbshell executable configurable either in settings.py
(DBSHELL_EXECUTABLE
) or through an environment variable (DJANGO_DBSHELL_EXECUTABLE
). The new executable must accept the same command line parameters.
If there is interest in this, i'll be happy to provide the bits for the other backends and the documentation.
$ DJANGO_DBSHELL_EXECUTABLE=pgcli python manage.py dbshell
Change History (6)
comment:1 by , 5 years ago
Easy pickings: | unset |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Summary: | Allow changing executable_name for dbshell management command → Allow changing executable_name for dbshell management command. |
comment:3 by , 5 years ago
For example inconsistency with supported arguments. I don't think we should maintain this and as I described above folks can use different executables if they really need to.
comment:4 by , 5 years ago
sure, while it's not much code to add, it's a fairly niche itch to scratch i agree.
but your comment implies that this has numerous "potential issues" and the only one you can come up with is the one that the PR makes clear: only dropin replacements would be supported that take exactly the same command line arguments (which most "upgraded" shells always do).
Are there any other issues besides "do your customisation at home"?
comment:5 by , 5 years ago
I said "can create". It's not only about arguments but also about respecting environment variables.
You can start a discussion on DevelopersMailingList if you don't agree.
comment:6 by , 5 years ago
nah, it's fine. i think it could be a better addition to django-extensions
. thank you for looking into it.
I don't think that
dbshell
should support or respect different executable names, this can create a bunch of issues. You can always use different command by aliasing at system level or by subclassing the built-in database backends.