答复: [JDBC] Some question about statement - Mailing list pgsql-jdbc

From 张元超
Subject 答复: [JDBC] Some question about statement
Date
Msg-id ae1387f04eb24cd29760751458117a51@EX01.highgo.com
Whole thread Raw
In response to Re: Some question about statement  (Daniel Blanch Bataller <dblanch@hoplasoftware.com>)
List pgsql-jdbc

Hi,Daniel

         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]
发送时间: 20151130 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.

 

-Daniel

 

 

El 30 nov 2015, a las 6:06, 张元超 <zhangyuanchao@highgo.com> escribió:

 

Hi,

         I have question about statement.Some method that provided by JAVA API were not implemented in postgresql jdbc.

I focus on method named ‘setCharacterStream(int parameterIndex, Reader value, long length)’,it was not implemented,but

‘setCharacterStream(int i, java.io.Reader x, int length)’ was implemented.The different between them is the type of the third

parameter. I don’t know why the first method was not implement,because the column can not store the ‘value’ whoes length

is the ‘length’? Or other reason? Thank you.

 

pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Some question about statement
Next
From: 张元超
Date:
Subject: 答复: [JDBC] Some question about statement