Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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?


Attachment: libpq_error_2.diff
Description: text/x-diff (16.6 KB)

In response to

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group