Re: Improving psql's \password command

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improving psql's \password command
Date: 2021-11-15 17:46:31
Message-ID: AEA1BA57-BD21-4237-9859-1C04FE38602B@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/12/21, 11:58 AM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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 Content-Type Size
v1-0001-Add-control-C-handling-for-psql-s-password-comman.patch application/octet-stream 8.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-11-15 18:12:44 Re: Improving psql's \password command
Previous Message Martín Marqués 2021-11-15 17:45:09 Re: Read access for pg_monitor to pg_replication_origin_status view