Re: Limit vs setMaxRows issue - Mailing list pgsql-jdbc

From Marc Herbert
Subject Re: Limit vs setMaxRows issue
Date
Msg-id khjirm53k3c.fsf@meije.emic.fr
Whole thread Raw
In response to Limit vs setMaxRows issue  (Sebastiaan van Erk <sebster@sebster.com>)
Responses Re: Limit vs setMaxRows issue  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Oliver Jowett <oliver@opencloud.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.


pgsql-jdbc by date:

Previous
From: Marc Herbert
Date:
Subject: Re: Limit vs setMaxRows issue
Next
From: Marc Herbert
Date:
Subject: java & endianness [Re: Binary tx format for an array?]