Re: proposal: psql: show current user in prompt

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jelte Fennema <postgres(at)jeltef(dot)nl>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kirk Wolak <wolakk(at)gmail(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: proposal: psql: show current user in prompt
Date: 2023-09-03 18:58:09
Message-ID: CAFj8pRCd3bR=+DUvgus20JaU_zRLjOczNvKGfV8qOZPKEspaig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

ne 3. 9. 2023 v 9:59 odesílatel Jelte Fennema <postgres(at)jeltef(dot)nl> napsal:

> On Sun, 3 Sept 2023 at 08:24, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> > My personal feeling from this area is that the protocol design is done,
> but it is not implemented on libpq level. My feelings can be wrong. The
> protocol number is hardcoded in libpq, so I cannot change it from the
> client side.
>
>
> No, I agree you're right the client side code to fall back to older
> versions is not implemented. But that seems fairly simple to do. We
> can change pqGetNegotiateProtocolVersion3 its behaviour. That function
> should change conn->pversion to the server provided version if it's
> lower than the client version (as long as the server provided version
> is 3.0 or larger). And then we should return an error when calling
> PQlinkParameterStatus/PQunlinkParameterStatus if the pversion is not
> high enough.
>

ok

here is an try

Regards

Pavel

Attachment Content-Type Size
0003-allow-to-connect-to-server-with-major-protocol-versi.patch text/x-patch 4.0 KB
0002-PQlinkParameterStatus-PQunlinkParameterStatus-test-b.patch text/x-patch 2.9 KB
0004-Implementation-of-N-prompt-placeholder.patch text/x-patch 5.7 KB
0001-Protocol-ReportGUC-message.patch text/x-patch 10.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2023-09-03 20:48:15 Re: Why doesn't Vacuum FULL update the VM
Previous Message Nathan Bossart 2023-09-03 15:11:16 Re: Inefficiency in parallel pg_restore with many tables