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

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

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?

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...

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 mergin

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 awhi

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

[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 cleartext