Re: [HACKERS] libpq ssl - clear fallback looses error messages

2008-10-20 Thread Magnus Hagander
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] 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

Re: [HACKERS] libpq ssl - clear fallback looses error messages

2008-10-11 Thread Magnus Hagander
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: Tom Lane wrote: Maybe the answer is to not throw away the first error message? But presenting both messages could be confusing too. Do we have the infrastructure to report more than one error? I thought we didn't... I was

Re: [HACKERS] libpq ssl - clear fallback looses error messages

2008-10-11 Thread Magnus Hagander
Magnus Hagander wrote: Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: Tom Lane wrote: Maybe the answer is to not throw away the first error message? But presenting both messages could be confusing too. Do we have the infrastructure to report more than one error? I thought we

Re: [HACKERS] libpq ssl - clear fallback looses error messages

2008-10-11 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] 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

[HACKERS] libpq ssl - clear fallback looses error messages

2008-10-10 Thread Magnus Hagander
I noticed while working on general fixes for the certificate handling that if we have a connection being attempted with sslmode=prefer (which happens to be our default), we will loose error messages. Basically, if we fail the SSL connection, we will throw away the error message and try a

Re: [HACKERS] libpq ssl - clear fallback looses error messages

2008-10-10 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: I noticed while working on general fixes for the certificate handling that if we have a connection being attempted with sslmode=prefer (which happens to be our default), we will loose error messages. Yeah, this came up awhile ago. I don't see any easy

Re: [HACKERS] libpq ssl - clear fallback looses error messages

2008-10-10 Thread Magnus Hagander
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: I noticed while working on general fixes for the certificate handling that if we have a connection being attempted with sslmode=prefer (which happens to be our default), we will loose error messages. Yeah, this came up awhile ago. I

Re: [HACKERS] libpq ssl - clear fallback looses error messages

2008-10-10 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Tom Lane wrote: Maybe the answer is to not throw away the first error message? But presenting both messages could be confusing too. Do we have the infrastructure to report more than one error? I thought we didn't... I was thinking of merging the