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

From: Benoît Dufour <benoit(dot)dufour(at)mail(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [Feature request] Add a way to get the length of a PQerrorMessage in libpq
Date: 2025-08-14 15:40:20
Message-ID: 2f8664b8-9b7a-4d2e-a90f-fca262ed2f07@mail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello hackers,

I've been using PostgreSQL for about one year, and so far I like it a
lot, way more than MySQL or MariaDB, but I still have a little feature
request for libpq.

Could you add a way to get the size of an error message in libpq?

PQerrorMessage isn't enough when you want to do exact size string
concatenation or copy of the error message.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2025-08-14 15:43:28 Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words
Previous Message Greg Burd 2025-08-14 15:37:28 Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words