Thnanks for repling to me. I think you are right. Fields in postgres can not be larger than 1 GB,but in java,the size of a string whoes length is Integer.MAX_VALUE is about 2GB. So the ‘int’ type may beyond the limit of fields,’long’ type is not necessary . I think that is why almost methods like ‘setCharacterStream’ can not support ‘long’ type parameter,or convert the ‘long’ parameter to ‘int’.
发件人: Daniel Blanch Bataller [mailto:dblanch@hoplasoftware.com] 发送时间: 2015年11月30日 14:28 收件人:张元超 抄送: pgsql-jdbc@postgresql.org 主题: Re: [JDBC] Some question about statement
Hi,
I guess its simply because String fields in postgres can not be larger than 1 GB, long type could represent length values far beyond this limit surpassing postgres limits.