> Chris Bitmead <chrisb@nimrod.itg.telstra.com.au> writes:
> > I was noticing that psql now exits on ctrl-C.
>
> Ugh. So now, if you type control-C while a query is in progress,
> you get a cancel request sent, as you intended. Type it a tenth of
> a second too late, however, and you get booted out of psql instead.
>
> I think this is lousy human engineering, even though I'm sure Peter
> thought it was a good idea at the time. If we trap control-C we
> should trap it all the time, not create a delay-dependent behavior.
Yes, I figured that would be an issue. Not sure if I like it or not.
Of course, ^D exits you if you are not in a query.
>
> > This is much better than the previous behaviour where it kinda got
> > muddled up and you could destroy your database if a half-completed
> > command was in its buffer.
>
> What? Are you saying that control-C doesn't do a \r (reset the
> query buffer)? That's probably true, and I agree that it should...
Looks like it works fine:
test=> select * from pg_class, pg_proc;^CCancel request sentERROR: Query was cancelled.test=>
-- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026