Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connected with driver * should be written in stderr #34

Open
mtxr opened this issue Dec 17, 2017 · 1 comment
Open

Connected with driver * should be written in stderr #34

mtxr opened this issue Dec 17, 2017 · 1 comment

Comments

@mtxr
Copy link

@mtxr mtxr commented Dec 17, 2017

I think that would be useful to write anything that is not a SQL result to STDERR.

This is useful when you are writing scripts like:
echo "show tables;" | ./usql mysql://user:pass@localhost:port/db 2> /dev/null

I woul like to get just the query results.

@kenshaw
Copy link
Member

@kenshaw kenshaw commented Dec 17, 2017

@mtxr that's not a bad suggestion. In general, I would like to clean up how output is handled / finish implementing the output formatting / redirecting so that it works more similarly to psql (ie, being able to redirect to a file, etc). I also think that possibly a switch to turn this off would be warranted. usql deviates from psql on this because it's needed more for usql since you can connect to multiple/different databases in the same session. An setting / variable to change this behavior would probably be prudent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.