X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C4EEBD1B182 for ; Tue, 8 Jun 2004 12:56:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38415-07 for ; Tue, 8 Jun 2004 15:56:27 +0000 (GMT) Received: from mail63.csoft.net (unknown [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 9368DD1C93B for ; Tue, 8 Jun 2004 12:56:19 -0300 (ADT) Received: (qmail 32369 invoked by uid 1112); 8 Jun 2004 15:56:05 -0000 Date: Tue, 8 Jun 2004 10:56:05 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: "Brian G. Huber" Cc: pgsql-jdbc@postgresql.org Subject: Re: Cursor returned from procedure ignores setFetchSize() on In-Reply-To: <002301c44d6b$82b1b420$6400a8c0@bghthinkpad> Message-ID: References: <002301c44d6b$82b1b420$6400a8c0@bghthinkpad> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/40 X-Sequence-Number: 10242 On Tue, 8 Jun 2004, Brian G. Huber wrote: > I need to return large result sets and therefore need a cursor with a small > fetch size (to avoid caching the entire query at once). However, it appears > that when a cursor is returned from a callable statement setFetchSize is > ignored. > > Is this a bug or am I doing something wrong? Any comments greatly > appreciated. Thanks > Yes, currently refcursor based ResultSets fetch all rows at once. I would say that this is a missing feature rather than a bug, but in any case it's something the driver can't do right now. I'll put this on my todo list, but it's not going at the top. I was under the impression that refcursor returning functions would fade with the advent of easier set returning functions. Have you considered using them instead? The advantage of returning refcursor seems to me that you don't need to create a pseudo type for the return value, or deal with specifying record types in the query. Are there other advantages I'm missing? Kris Jurka