Re: libpq ssl -> clear fallback looses error messages

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq ssl -> clear fallback looses error messages
Date: 2008-10-20 07:56:04
Message-ID: 48FC3994.8040809@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> Here's an ugly attempt towards this. Though I'm unsure if we can change
>> the "const" on the PQerrorMessage parameter without messing with library
>> versions and such?
>
> That's a bad idea in any case --- PQerrorMessage shouldn't be changing
> the state of anything. The merging needs to happen earlier.

That was my general thought, but since I'd written it, I just threw it
out there..

>> Another option could be to change all the calls that set the error
>> message to *append* to the error message instead. Thoughts on that?
>
> That might work ... but we'd probably have to add some "clear the
> message" calls in places. It might be worth trying to restrict this
> convention to the connection-startup code.

How about something like this?

//Magnus

Attachment Content-Type Size
libpq_error_2.diff text/x-diff 16.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-10-20 08:28:35 Re: minimal update
Previous Message Magnus Hagander 2008-10-20 07:28:28 Re: pg_hba options parsing