Re: Psql meta-command conninfo+

Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>

From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Sami Imseih <samimseih@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Maiquel Grassi <grassi@hotmail.com.br>, Hunaid Sohail <hunaidpgml@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, "David G. Johnston" <david.g.johnston@gmail.com>, Jim Jones <jim.jones@uni-muenster.de>, Nathan Bossart <nathandbossart@gmail.com>, "Imseih (AWS), Sami" <simseih@amazon.com>, Peter Eisentraut <peter@eisentraut.org>, Pavel Luzanov <p.luzanov@postgrespro.ru>, Erik Wienhold <ewie@ewie.name>, Dean Rasheed <dean.a.rasheed@gmail.com>
Date: 2025-02-26T12:34:28Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

> On 2025-Feb-22, Alvaro Herrera wrote:
>
>> Also, there's a bunch of "(char *)" casts that are 100% due to
>> printTableAddCell() taking a char * instead of const char * for the cell
>> value.  That seems a bit silly, we should change that.
>
> Ah, but the problem is that most of the input cells there come from
> PQgetValue which returns a char *, so we'd need different casts
> elsewhere.  Nevermind this ...

Also, it calls mbvalidate(cell, ...), which can modify the contents
(stripping out invalid characters), so we'd better hope all the possible
PQsslAttribute() values are valid UTF-8 or we've got possible UB on our
hands.

- ilmari



Commits

  1. psql: Change new \conninfo to use SSL instead of TLS

  2. Change \conninfo to use tabular format

  3. Update extension lookup routines to use the syscache

  4. Improve COPY TO performance when server and client encodings match

  5. doc: Remove superfluous bracket in synopsis

  6. Remove psql support for server versions preceding 9.2.