Re: [Feature request] Add a way to get the length of a PQerrorMessage in libpq

Поиск
Список
Период
Сортировка
От Benoît Dufour
Тема Re: [Feature request] Add a way to get the length of a PQerrorMessage in libpq
Дата
Msg-id f65f5e29-0e66-48a0-b582-3955815f3489@mail.com
обсуждение исходный текст
Ответ на Re: [Feature request] Add a way to get the length of a PQerrorMessage in libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [Feature request] Add a way to get the length of a PQerrorMessage in libpq
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления: