News for hackers. Stuff that matters.
Re:“Fashion Is Hard. PostgreSQL Is Easy” [video] by fweespeech on Thursday June 18, 2015 @10:26AM (#9738680)
> Ctrl-c kills the whole shell. great, but not what I expect.

That is actually exactly what you should expect. SIGINT cancels most things you run in the CLI.

Interrupt a ping because you forgot a count parameter? Ctrl+C

Honestly, the reason I don't use Postgres has nothing to do with the CLI and everything to do with the ecosystem for Multi-Master being inferior to Galera. But yeah, I'm happy with mysql-cli as well and don't really see the Postgres equivalent as a noteworthy improvement.

Re:“Fashion Is Hard. PostgreSQL Is Easy” [video] by antsar on Thursday June 18, 2015 @10:49AM (#9738837)
Ping isn't a CLI, its a single command that expects no further input. A database shell is more like bash than ping. And Ctrl-C does not exit out of bash.
Re:“Fashion Is Hard. PostgreSQL Is Easy” [video] by juliangregorian on Thursday June 18, 2015 @07:16PM (#9742168)
Many language REPLs don't exit on ctrl+c either, at least I know Ruby and Python don't. Node will, but it will make you do it twice.
[deleted]
Re:“Fashion Is Hard. PostgreSQL Is Easy” [video] by dllthomas on Thursday June 18, 2015 @12:12PM (#9739555)
Ctrl-C conventionally does not kill shell-like things. This is, technically, of course because of cooperation of those shell-like things and their handling of SIGINT, but that's not actually relevant.

The following things (off the top of my head, and quickly verified) all handle Ctrl-C so that it kills only the current command and not the containing process:

bash, zsh, csh, ksh, mail, gnuplot, gdb, psql, vsql, python (interactive), ghci

While I object to captive user interfaces in general, if you're going to have one then handling ctrl-c inside it is the right thing to do.

Re:“Fashion Is Hard. PostgreSQL Is Easy” [video] by jsight on Thursday June 18, 2015 @10:41AM (#9738772)
In Postgres' psql, Ctrl-C cancels the current statement. That's a more useful behavior than killing the entire psql process, IMO.