pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
To: John Kew <jkew@tableau.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: Re: 9.0.5 issue - duplicate rows returned when using SQL_ATTR_ROW_ARRAY_SIZE attribute
Date: Sat, 23 Jan 2016 21:43:09 +0900
Message-ID: <56A3755D.6050702@dream.email.ne.jp> (raw)
In-Reply-To: <CY1PR0301MB19789503BA20C2E1D15BDE19CCC40@CY1PR0301MB1978.namprd03.prod.outlook.com>
References: <CY1PR0301MB19784F9A1AC0529A01B832ACCCC00@CY1PR0301MB1978.namprd03.prod.outlook.com>
	<CY1PR0301MB197858D2B4F0B69045F09FB5CCC10@CY1PR0301MB1978.namprd03.prod.outlook.com>
	<569F699C.5090209@dream.email.ne.jp>
	<569F7C94.6010203@dream.email.ne.jp>
	<56A21BA7.3050900@dream.email.ne.jp>
	<CY1PR0301MB19789503BA20C2E1D15BDE19CCC40@CY1PR0301MB1978.namprd03.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

Hi,

Please try the attached patch.
Or please try the drivers on testing for 9.5.0101 at
  http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
.

regards,
Hiroshi Inoue

On 2016/01/23 1:40, John Kew wrote:
>
> We would be happy to.
>
>
> -John
>
>
>
> ------------------------------------------------------------------------
> *From:* Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
> *Sent:* Friday, January 22, 2016 4:08 AM
> *To:* John Kew
> *Cc:* pgsql-odbc@postgresql.org
> *Subject:* Re: [ODBC] Re: 9.0.5 issue - duplicate rows returned when 
> using SQL_ATTR_ROW_ARRAY_SIZE attribute
> Hi John,
>
> I can reproduce the case now and have a trial patch.
> Could you test it?
>
> regards,
> Hiroshi Inoue
>
> On 2016/01/20 21:24, Inoue, Hiroshi wrote:
>>
>>>
>>
>

-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Attachments:

row_array_size.patch (text/x-diff, 1.4K) download diff --git a/connection.c b/connection.c index 8d2d7e7..86d7da7 100644 --- a/connection.c +++ b/connection.c @@ -1886,7 +1886,7 @@ inolog("Discarded the first SAVEPOINT\n"); * called from QR_next_tuple and must return * immediately. */ - if (!CC_from_PGresult(res, stmt, self, cursor, &pgres)) + if (!CC_from_PGresult(res, stmt, NULL, cursor, &pgres)) { retres = NULL; break; diff --git a/qresult.c b/qresult.c index 7f3445b..5848959 100644 --- a/qresult.c +++ b/qresult.c @@ -592,6 +592,8 @@ QR_from_PGresult(QResultClass *self, StatementClass *stmt, ConnectionClass *conn Int2 dummy1, dummy2; int cidx; +if (NULL != conn) +{ /* First, get column information */ QR_set_conn(self, conn); @@ -660,6 +662,7 @@ inolog("!![%d].PGType %u->%u\n", i, PIC_get_pgtype(ipdopts->parameters[i]), CI_g } } } +} /* Then, get the data itself */ @@ -670,10 +673,13 @@ inolog("!!%p->cursTup=%d total_read=%d\n", self, self->cursTuple, self->num_tota if (!QR_once_reached_eof(self) && self->cursTuple >= (Int4) self->num_total_read) self->num_total_read = self->cursTuple + 1; +if (NULL != conn) +{ /* Force a read to occur in next_tuple */ QR_set_next_in_cache(self, 0); QR_set_rowstart_in_cache(self, 0); self->key_base = 0; +} /* * Also fill in command tag. (Typically, it's SELECT, but can also be

view thread (8+ messages)  latest in thread

Message-ID: <56A3755D.6050702@dream.email.ne.jp>
Permalink:  ../56A3755D.6050702@dream.email.ne.jp/
Also on:    postgresql.org/message-id/56A3755D.6050702@dream.email.ne.jp

 ·  · 

reply

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: h-inoue@dream.email.ne.jp, jkew@tableau.com
  Subject: Re: 9.0.5 issue - duplicate rows returned when using SQL_ATTR_ROW_ARRAY_SIZE attribute
  In-Reply-To: <56A3755D.6050702@dream.email.ne.jp>
  References: <CY1PR0301MB19784F9A1AC0529A01B832ACCCC00@CY1PR0301MB1978.namprd03.prod.outlook.com> <CY1PR0301MB197858D2B4F0B69045F09FB5CCC10@CY1PR0301MB1978.namprd03.prod.outlook.com> <569F699C.5090209@dream.email.ne.jp> <569F7C94.6010203@dream.email.ne.jp> <56A21BA7.3050900@dream.email.ne.jp> <CY1PR0301MB19789503BA20C2E1D15BDE19CCC40@CY1PR0301MB1978.namprd03.prod.outlook.com> <56A3755D.6050702@dream.email.ne.jp>

* 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