Re: [HACKERS] psql problem

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: chris(at)bitmead(dot)com, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] psql problem
Date: 2000-02-17 03:36:22
Message-ID: 200002170336.WAA23346@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)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;
^C
Cancel request sent
ERROR: Query was cancelled.
test=>

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-02-17 04:02:21 Re: [HACKERS] psql problem
Previous Message Bruce Momjian 2000-02-17 03:34:02 Re: [HACKERS] psql problem]