pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
 答复: [JDBC] Some question about statement
3+ messages / 2 participants
[nested] [flat]

*  答复: [JDBC] Some question about statement
@ 2015-11-30 06:27 ` 张元超 <zhangyuanchao@highgo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: 张元超 @ 2015-11-30 06:27 UTC (permalink / raw)
  To: Daniel Blanch Bataller <dblanch@hoplasoftware.com>; +Cc: 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]
发送时间: 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.

-Daniel


El 30 nov 2015, a las 6:06, 张元超 <zhangyuanchao@highgo.com<mailto: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.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

*  答复: [JDBC] Some question about statement
@ 2015-11-30 06:33 ` 张元超 <zhangyuanchao@highgo.com>
  2015-11-30 07:44   `  Re: [JDBC] 答复: [JDBC] Some question about statement Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  1 sibling, 1 reply; 3+ messages in thread

From: 张元超 @ 2015-11-30 06:33 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; Daniel Blanch Bataller <dblanch@hoplasoftware.com>; +Cc: pgsql-jdbc

Hi, Vladimir
	Thanks for repling to me.You are right,jdbc was done like you said in somewhere,for example the following method:
	' setBinaryStream(int parameterIndex, InputStream value, long length)' in AbstractJdbc4Statement.java

-----邮件原件-----
发件人: Vladimir Sitnikov [mailto:sitnikov.vladimir@gmail.com] 
发送时间: 2015年11月30日 14:30
收件人: Daniel Blanch Bataller
抄送: 张元超; pgsql-jdbc@postgresql.org
主题: Re: [JDBC] Some question about statement

I think `long` method just check bounds and delegate to int one.

Vladimir

-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

*  Re: [JDBC] 答复: [JDBC] Some question about statement
  2015-11-30 06:33 `  答复: [JDBC] Some question about statement 张元超 <zhangyuanchao@highgo.com>
@ 2015-11-30 07:44   ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Vladimir Sitnikov @ 2015-11-30 07:44 UTC (permalink / raw)
  To: 张元超 <zhangyuanchao@highgo.com>; +Cc: Daniel Blanch Bataller <dblanch@hoplasoftware.com>; pgsql-jdbc

Pull requests are welcome.

Vladimir


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2015-11-30 07:44 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 06:27 ` 张元超 <zhangyuanchao@highgo.com>
2015-11-30 06:33 ` 张元超 <zhangyuanchao@highgo.com>
2015-11-30 07:44   ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox