Re: [HACKERS] psql problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(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 04:02:21
Message-ID: 13338.950760141@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> 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=>

No, I think Chris was complaining about the behavior with an
incomplete query in the buffer. I can't show it with current
sources since psql is exiting on ^C, but 6.5 works like this:

play=> foobar
play-> ^C
CANCEL request sent
<-- return typed here to get a prompt
play-> select 2+2;
ERROR: parser: parse error at or near "foobar"
play=>

Notice the prompt correctly shows that I still have stuff in the
query buffer after ^C. I think Chris is saying that ^C should
flush the buffer like \r does ... and I agree.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christof Petig 2000-02-17 04:08:08 Re: [HACKERS] function question yet again
Previous Message Bruce Momjian 2000-02-17 03:36:22 Re: [HACKERS] psql problem