Re: Limit vs setMaxRows issue

From: Marc Herbert <Marc(dot)Herbert(at)continuent(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Limit vs setMaxRows issue
Date: 2006-07-10 09:06:15
Message-ID: khjirm53k3c.fsf@meije.emic.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Oliver Jowett <oliver(at)opencloud(dot)com> writes:

> It's not a bug. setMaxRows() is essentially a hint, there's certainly
> no requirement that the driver will go off and add LIMIT clauses to
> your query,

My reading of the JDBC javadoc and my excessive "pickiness" do not
agree with the word "hint"

/**
* Sets the limit for the maximum number of rows that any
* <code>ResultSet</code> object can contain to the given number.
* If the limit is exceeded, the excess
* rows are silently dropped.

OK nothing ever tells you that the server has to behave optimally and
never compute anything useless. However in this case you know _for
sure_ that additional rows will be useless.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Marc Herbert 2006-07-10 09:19:44 java & endianness [Re: Binary tx format for an array?]
Previous Message Marc Herbert 2006-07-10 08:59:23 Re: Limit vs setMaxRows issue