From: Scot Loach <sloach@sandvine.com>
To: Dave Page <dpage@vale-housing.co.uk>
To: Anoop Kumar <anoopk@pervasive-postgres.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: changed behavior in libpq odbc driver
Date: Thu, 15 Sep 2005 21:53:22 -0400
Message-ID: <71837C040963F748B9B94E123A2896785A108D@mailserver.sandvine.com> (raw)
In LIBPQ_execute_query():
qres->status = PQresultStatus(pgres);
In the bad primary key case, this returns PGRES_FATAL_ERROR.
Then, in SC_execute():
/* Check the status of the result */
if (res)
{
was_ok = QR_command_successful(res);
was_nonfatal = QR_command_nonfatal(res);
was_fatal = QR_command_fatal(res);
if (was_ok)
SC_set_errornumber(self, STMT_OK);
else if (was_fatal)
SC_set_errornumber(self,STMT_BAD_ERROR);
And STMT_BAD_ERROR is what returns 08S01 when I call SQLGetDiagRec.
I could really use some help with this...
-----Original Message-----
From: Dave Page [mailto:dpage@vale-housing.co.uk]
Sent: Wed 9/7/2005 9:02 AM
To: Scot Loach; Anoop Kumar
Cc: pgsql-odbc@postgresql.org
Subject: RE: [ODBC] changed behavior in libpq odbc driver
> -----Original Message-----
> From: Scot Loach [mailto:sloach@sandvine.com]
> Sent: 07 September 2005 13:48
> To: Dave Page; Anoop Kumar
> Cc: pgsql-odbc@postgresql.org
> Subject: RE: [ODBC] changed behavior in libpq odbc driver
>
> so I'm definitely still able to reproduce this problem.
> The test I'm running is somewhat complex, I can work on
> simplifying it.
> Maybe the error code is left around from before and not
> properly cleared?
Well the only time the error code should be set is if libpq reports the
connection as being bad, so if you're definitely seeing it, it must be
coming from somewhere else, or you're not checking the error code when
it actually arrives.
Can you add a mylog line into the relevant part of the fix I posted so
youo can see if the error code is being set somewhen that you don't
otherwise notice?
Regards Dave
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: sloach@sandvine.com, dpage@vale-housing.co.uk, anoopk@pervasive-postgres.com
Subject: Re: changed behavior in libpq odbc driver
In-Reply-To: <71837C040963F748B9B94E123A2896785A108D@mailserver.sandvine.com>
References: <71837C040963F748B9B94E123A2896785A108D@mailserver.sandvine.com>
* 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