pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Ireland <james@halfcab.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Fetching rows from a cursor returned by a stored function
Date: Sat, 18 Sep 2004 21:09:27 +0100
Message-ID: <414C95F7.7060108@halfcab.com> (raw)
In-Reply-To: <25955.1095462177@sss.pgh.pa.us>
References: <414AFFAD.6040404@halfcab.com>
	<414B6B45.20900@opencloud.com>
	<25955.1095462177@sss.pgh.pa.us>

Thanks a lot for your help.  I've implemented the successive "FETCH n" commands approach and it works a treat.

-James

Tom Lane wrote:
> Oliver Jowett <oliver@opencloud.com> writes:
> 
>>It might even work to execute FETCH FORWARD ALL for the cursor with a 
>>non-zero fetchsize (and let the driver manage incremental fetches) but 
>>I'm not sure what the behaviour of a non-zero row limit on a FETCH query 
>>is at the protocol level..
> 
> 
> [ digs in code... ]  It looks like the behavior would be to (a)
> materialize the entire result of FETCH FORWARD ALL inside the backend,
> then (b) hand back the number of rows you requested.  Probably not what
> you want :-(.  I'd suggest issuing successive "FETCH n" commands and
> ignoring the protocol-level limit feature.
> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
> 
> 
> 



view thread (4+ messages)

Message-ID: <414C95F7.7060108@halfcab.com>
Permalink:  ../414C95F7.7060108@halfcab.com/
Also on:    postgresql.org/message-id/414C95F7.7060108@halfcab.com

 · 

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-jdbc@postgresql.org
  Cc: james@halfcab.com, tgl@sss.pgh.pa.us, oliver@opencloud.com
  Subject: Re: Fetching rows from a cursor returned by a stored function
  In-Reply-To: <414C95F7.7060108@halfcab.com>
  References: <414AFFAD.6040404@halfcab.com> <414B6B45.20900@opencloud.com> <25955.1095462177@sss.pgh.pa.us> <414C95F7.7060108@halfcab.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