It recalculates the strlen of the error message.
This is a bad behaviour for softwares that need to execute quickly.
The length of the error message should just be stored in a size_t
variable while the error message is generated instead and not recalculated.
Le 14/08/2025 à 11:53, Tom Lane a écrit :
> =?UTF-8?Q?Beno=C3=AEt_Dufour?= <benoit.dufour@mail.com> writes:
>> Could you add a way to get the size of an error message in libpq?
> What's wrong with applying strlen() to the result of PQerrorMessage?
>
> regards, tom lane