Re: [HACKERS] psql and Control-C - Mailing list pgsql-hackers

From Chris Bitmead
Subject Re: [HACKERS] psql and Control-C
Date
Msg-id 38AC8571.1306E0B8@nimrod.itg.telecom.com.au
Whole thread Raw
In response to psql and Control-C  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [HACKERS] psql and Control-C  (Alfred Perlstein <bright@wintelcom.net>)
Re: [HACKERS] psql and Control-C  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> 
> Some people have indicated that they don't like how psql currently handles
> Control-C if no query is in progress. I consider the behaviour of the
> shells desirable but, quite frankly, I don't know how to do it.

The typical way to do this sort of thing is to longjmp back to the main
loop. And I think if you look at sig.c in bash, this is probably what
they are doing.

> Actually, shouldn't a Ctrl-C in a script cancel the query *and* stop the
> script at all times?

Yes.


pgsql-hackers by date:

Previous
From: Chris Bitmead
Date:
Subject: Re: [HACKERS] libpq
Next
From: "Herr Dumont"
Date:
Subject: password change / table creation