On 11/17/21, 4:38 PM, "Bossart, Nathan" <bossartn@amazon.com> wrote:
> On 11/17/21, 4:15 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>> As you mentioned, there are several other simple_prompt() calls
>> that could usefully be improved. (I think the one in startup.c
>> may be OK because we've not set up the SIGINT handler yet,
>> though.) I wondered whether it's worth refactoring some more
>> to have just one function that sets up the context mechanism.
>
> I'll get started on these.
Okay, here is an attempt at adding control-C support for \prompt and
\connect. It was reasonably straightforward. I did have to teach
simple_prompt_extended() to add a newline after a cancellation when
"echo" is true.
I think that's it for psql. After a quick glance, I didn't see any
other obvious candidates for control-C support, but I'll look a little
closer to be sure.
Nathan