From: Oliver Jowett <oliver@opencloud.com>
To: Guido Fiala <guido.fiala@dka-gmbh.de>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: fetchsize dynamically changeable?
Date: Wed, 28 Jul 2004 21:45:02 +1200
Message-ID: <4107759E.3080509@opencloud.com> (raw)
In-Reply-To: <200407280839.56336.guido.fiala@dka-gmbh.de>
References: <200407280839.56336.guido.fiala@dka-gmbh.de>
Guido Fiala wrote:
> BTW - how is FETCH BACKWARD, what needs to be done to get it working?
Briefly..
- design a scrollable cursor interface (extensions to QueryExecutor and
perhaps ResultHandler, ResultCursor)
- implement scrollable buffering logic in our ResultSet implementations
(can probably take code from the earlier unapplied
scrollable-cursor-resultset patch)
- implement protocol-specific scrollable cursor logic
. for the V3 path, this needs the DECLARE+parameters patch I have
pending applied on the server side.
. there is code in CVS history for analyzing statements and
transforming to DECLARE/FETCH where appropriate
I'm not sure what the split in the buffering logic between
protocol-specific code and abstract resultset code should be. One
approach is to just extend the QUERY_FORWARD_CURSOR style interface to
allow fetching at arbitary absolute locations when
QUERY_SCROLLABLE_CURSOR was specified originally. This is probably simpler.
Another approach is to abstract the storage of result data and have the
high-level code say "give me row number N" and the protocol
implementation deals with buffering and cursor movement implicitly. This
is architecturally nicer, and will better handle things like support for
binary-format resultsets, or even the SPI interface that Thomas
mentioned recently. But it'll be more work.
Also, this needs to be done keeping support for WITH HOLD cursors in
mind. Once the DECLARE/FETCH rewriting code is present, WITH HOLD should
be easy to add..
None of this has been started on, AFAIK.
-O
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-jdbc@postgresql.org
Cc: oliver@opencloud.com, guido.fiala@dka-gmbh.de
Subject: Re: fetchsize dynamically changeable?
In-Reply-To: <4107759E.3080509@opencloud.com>
References: <200407280839.56336.guido.fiala@dka-gmbh.de> <4107759E.3080509@opencloud.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