X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 368309FA7BA for ; Wed, 21 Jun 2006 13:10:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 11012-09 for ; Wed, 21 Jun 2006 13:10:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from hs5.cfa.cmu.edu (HS5.CFA.cmu.edu [128.2.103.215]) by postgresql.org (Postfix) with ESMTP id 5C26E9F9F2D for ; Wed, 21 Jun 2006 13:10:24 -0300 (ADT) Received: from webmail.webopticon.org (hs5.cfa.cmu.edu [127.0.0.1]) by hs5.cfa.cmu.edu (8.12.11.20060308/8.12.11) with ESMTP id k5LGAM4W029485 for ; Wed, 21 Jun 2006 12:10:22 -0400 Received: from 216.41.12.254 (SquirrelMail authenticated user agentm) by webmail.webopticon.org with HTTP; Wed, 21 Jun 2006 12:10:22 -0400 (EDT) Message-ID: <34158.216.41.12.254.1150906222.squirrel@webmail.webopticon.org> In-Reply-To: References: <44990D57.9070506@sebster.com> Date: Wed, 21 Jun 2006 12:10:22 -0400 (EDT) Subject: Re: Limit vs setMaxRows issue From: "A.M." To: pgsql-jdbc@postgresql.org User-Agent: SquirrelMail/1.5.1 [CVS] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/73 X-Sequence-Number: 15353 On Wed, June 21, 2006 12:00 pm, Kris Jurka wrote: > > I'm not sure how you would like the driver to tell the server that it > doesn't want more than setMaxRows rows. The defined API for this is using > LIMIT in your sql query. The driver cannot do this for you (at least > without parsing your query) because the query may already have a LIMIT or > it may be something like an INSERT into a VIEW that has a DO INSTEAD > SELECT rule on it. If you're suggesting that we extended the > frontend/backend protocol to include this extra information than that's > definitely a feature request, not a bug report. The backend protocol already supports maximum row limit if you use the extended protocol. I guess it's a legacy thing in the driver, but there really is no reason to use the simple query protocol at all on recent postgresqls. -M