Re: Psql meta-command conninfo+

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br>, Hunaid Sohail <hunaidpgml(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Erik Wienhold <ewie(at)ewie(dot)name>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Subject: Re: Psql meta-command conninfo+
Date: 2025-02-26 12:34:28
Message-ID: 87mse828bv.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jakub Wartak 2025-02-26 13:05:59 Re: Draft for basic NUMA observability
Previous Message Alexander Korotkov 2025-02-26 12:14:31 Re: Removing unneeded self joins