Google+ Followers

donderdag 9 juli 2015

Why I like PostgreSQL more than MySQL: Ctrl-C stops mysql-cli

If you type a query into MySQL's commandline tool and you mess up the quotes or something, the cursor will move to the next line and tell you that it's waiting for an ending-quote or whatever. The only way to get out of that is to complete the query syntax (which you cannot do because the first part is already wrong) or by pressing Ctrl-C which quits the tool altogether.

In PostgreSQL's commandline tool pressint Ctrl-C abandons the current query without executing it, so you can go into your query-history and fix the error.
To quit the tool, you must enter Ctrl-D, or the \d command.