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

From Bossart, Nathan
Subject Re: Improving psql's \password command
Date
Msg-id AEA1BA57-BD21-4237-9859-1C04FE38602B@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/12/21, 11:58 AM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
> Right, it makes sense to consider just this much as the back-patchable
> part, and leave the more complicated messing with simple_prompt()
> for HEAD only.  I made a couple further cosmetic tweaks and pushed it.

Here is an attempt at adding control-C support for \password.  With
this patch, we pass sigint_interrupt_jmp and sigint_interrupt_enabled
all the way down to pg_get_line_append(), which is admittedly a bit
more complicated than I think would be ideal.  I see a couple of other
calls to simple_prompt() (e.g., \prompt and \connect), and I think the
same infrastructure could be used for those as well.  I'll send some
follow-up patches for those if this approach seems reasonable.

Nathan


Attachment

pgsql-hackers by date:

Previous
From: Martín Marqués
Date:
Subject: Re: Read access for pg_monitor to pg_replication_origin_status view
Next
From: Tom Lane
Date:
Subject: Re: Improving psql's \password command