Re: [RFC] How about changing the default value of defaultRowFetchSize? - Mailing list pgsql-jdbc

From Tsunakawa, Takayuki
Subject Re: [RFC] How about changing the default value of defaultRowFetchSize?
Date
Msg-id 0A3221C70F24FB45833433255569204D1F63681D@G01JPEXMBYT05
Whole thread Raw
In response to Re: [RFC] How about changing the default value of defaultRowFetchSize?  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: [RFC] How about changing the default value of defaultRowFetchSize?  (Vladimir Gordiychuk <folyga@gmail.com>)
Re: [RFC] How about changing the default value of defaultRowFetchSize?  (Vladimir Gordiychuk <folyga@gmail.com>)
List pgsql-jdbc
From: davecramer@gmail.com [mailto:davecramer@gmail.com] On Behalf Of
> Dave Cramer
> This states that if setFetchSize has not been called then we return what
> we want. Given that if the statement is in auto-commit then the fetch size
> is irrelevant. The correct logic would be if autocommit=false then return
> the default value, otherwise 0, but I'm not advocating this either.
> 
> So my question to you is how would you use this information anyway? It's
> not like you can allocate more memory or something to accommodate the rows.
> It makes more sense to me that if I get 0 back then I know I have to set
> it. If I get the value back that I set it to then I know what's going on.
> I would assert that anyone that is knowledgable enough to use this is going
> to call setFetchSize.

I got your point, thanks.  I agree that getFetchSize() returns 0 when setFetchSize() hasn't been called yet or
setFetchSize(0)was called.  Users can interpret the return value of 0 as (1) defaultRowFetchSize if autocommit is off,
or(2) all rows if autocommit is on.
 

I think I'll submit a patch.  Of course, I don't mind if anyone will do it.

Regards
Takayuki Tsunakawa



pgsql-jdbc by date:

Previous
From: Greg Stark
Date:
Subject: Re: postgresql support new time zone TRT
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [RFC] How about changing the default value ofdefaultRowFetchSize?