Re: Server Side Cursors.

Lists: pgsql-odbc
From: "Ryan C(dot) Bonham" <Ryan(at)srfarms(dot)com>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: "Pgsql-Odbc (E-mail)" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Server Side Cursors.
Date: 2001-11-20 13:32:50
Message-ID: 19AB8F9FA07FB0409732402B4817D75A125165@FILESERVER.SRF.srfarms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Hiroshi,

Here is some more information..

> What cursor type are you using ?

Working setup is:
Client Side Cursors Location, Static cursor type, and Optimistic Locking.

The Following setups return only 8 records out of 5110:
Server Side Cursors Location, Static cursor type, and Optimistic Locking.
Server Side Cursors Location, Keyset cursor type, and Optimistic Locking.
Server Side Cursors Location, Static cursor type, and Pessimistic Locking.
Server Side Cursors Location, Keyset cursor type, and Pessimistic Locking.
Server Side Cursors Location, Static cursor type, and ReadOnly Locking.

The following return 0 records:
Server Side Cursors Location, Dynamic cursor type, and Optimistic Locking.
Server Side Cursors Location, forward-only cursor type, and ReadOnly Locking.
Server Side Cursors Location, Dynamic cursor type, and Pessimistic Locking.
Server Side Cursors Location, Dynamic cursor type, and ReadOnly Locking.

The Select command the dataenvironment is using is;
select * from bloods where date is not null order by date desc

Here is the table structure:
CREATE TABLE "bloods" (
"date" date,
"animal" varchar(10),
"p" text,
"s" char(15),
"glu" float8,
"bun" text,
"crea" float8,
"tp" float8,
"alb" float8,
"tbil" float8,
"alp" float8,
"alt" float8,
"ast" float8,
"chol" text,
"ca" float8,
"phos" float8,
"na" float8,
"k" float8,
"cl" float8,
"agratio" text,
"buncreatinineratio" float8,
"globulin" text,
"magnesium" text,
"hgb" float8,
"htc" float8,
"wbc" float8,
"rbc" float8,
"mcv" float8,
"mch" float8,
"mchc" float8,
"plt" float8,
"plymph" text,
"plymphpercent" text,
"band" text,
"bandpercent" text,
"lymph" text,
"lymphpercent" text,
"mono" text,
"monopercent" text,
"eos" text,
"eospercent" text,
"baso" text,
"basopercent" text
);
CREATE INDEX "date_bloods_key" ON "bloods" ("date");
CREATE INDEX "animal_bloods_key" ON "bloods" ("animal");

Thanks again.

Ryan


From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: "Ryan C(dot) Bonham" <Ryan(at)srfarms(dot)com>
Cc: "Pgsql-Odbc (E-mail)" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Server Side Cursors.
Date: 2001-11-22 02:16:49
Message-ID: 3BFC6011.1559E115@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

"Ryan C. Bonham" wrote:
>
> Hiroshi,
>
> Here is some more information..
>
> > What cursor type are you using ?
>
> Working setup is:
> Client Side Cursors Location, Static cursor type, and Optimistic Locking.
>
> The Following setups return only 8 records out of 5110:
> Server Side Cursors Location, Static cursor type, and Optimistic Locking.
> Server Side Cursors Location, Keyset cursor type, and Optimistic Locking.
> Server Side Cursors Location, Static cursor type, and Pessimistic Locking.
> Server Side Cursors Location, Keyset cursor type, and Pessimistic Locking.
> Server Side Cursors Location, Static cursor type, and ReadOnly Locking.
>
> The following return 0 records:
> Server Side Cursors Location, Dynamic cursor type, and Optimistic Locking.
> Server Side Cursors Location, forward-only cursor type, and ReadOnly Locking.
> Server Side Cursors Location, Dynamic cursor type, and Pessimistic Locking.
> Server Side Cursors Location, Dynamic cursor type, and ReadOnly Locking.
>
> The Select command the dataenvironment is using is;
> select * from bloods where date is not null order by date desc

Here I can see that Dynamic cursors return no row but
Keyset/Static cursors seem to return proper results for
some simple test cases.
Anyway the current psqlodbc driver itself supports only
ForwardOnly/Static cursors with ReadOnly locking. Oh,
they don't return proper results either. Hmm strange..

regards,
Hiroshi Inoue