From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: libpq error message refactoring
Date: Thu, 22 Sep 2022 22:37:29 -0400
Message-ID: <2032645.1663900649@sss.pgh.pa.us> (raw)
In-Reply-To: <d5dddca7-9bdc-ee18-1ec9-ee21f8302d4a@enterprisedb.com>
References: <7c0232ef-7b44-68db-599d-b327d0640a77@enterprisedb.com>
<20220922154225.q4rtgzzsq6pd4f5x@awork3.anarazel.de>
<d5dddca7-9bdc-ee18-1ec9-ee21f8302d4a@enterprisedb.com>
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 22.09.22 17:42, Andres Freund wrote:
>> It's not the cause of this failure, I think, but doesn't appendPQExpBufferVA
>> need to be added to exports.txt?
> I don't want to make that function available to users of libpq, just use
> it inside libpq across .c files. Is there no visibility level for that?
Should "just work", I should think. I agree with Andres that that's
not the cause of the build failure. I wonder if somehow the failing
links are picking up the wrong libpq.a.
Separately from that: is it really okay to delegate use of a va_list
argument like that? The other call paths of
appendPQExpBufferVA[_internal] write va_start/va_end directly around it,
not somewhere else in the call chain. I'm too tired to language-lawyer
out what happens when you do it like this, but I'm suspecting that it's
not well-defined portable behavior.
I think what you probably need to do is export appendPQExpBufferVA
as-is and require libpq_append_error to provide the error loop.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com, andres@anarazel.de
Subject: Re: libpq error message refactoring
In-Reply-To: <2032645.1663900649@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox