Re: Improving psql's \password command - Mailing list pgsql-hackers

From Bossart, Nathan
Subject Re: Improving psql's \password command
Date
Msg-id 450C0AD1-CF21-4056-A9EE-6201E9763FC9@amazon.com
Whole thread Raw
In response to Re: Improving psql's \password command  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Improving psql's \password command
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: row filtering for logical replication
Next
From: Amit Langote
Date:
Subject: Re: pg_get_publication_tables() output duplicate relid