From: 张元超 <zhangyuanchao@highgo.com>
To: Daniel Blanch Bataller <dblanch@hoplasoftware.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: 答复: [JDBC] Some question about statement
Date: Mon, 30 Nov 2015 06:27:49 +0000
Message-ID: <ae1387f04eb24cd29760751458117a51@EX01.highgo.com> (raw)
In-Reply-To: <62630FA5-1611-4EBD-B6BC-01780A4E8853@hoplasoftware.com>
References: <12fea0627c29480bbef183471e61b8ee@EX01.highgo.com>
<62630FA5-1611-4EBD-B6BC-01780A4E8853@hoplasoftware.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: zhangyuanchao@highgo.com, dblanch@hoplasoftware.com
Subject: Re: 答复: [JDBC] Some question about statement
In-Reply-To: <ae1387f04eb24cd29760751458117a51@EX01.highgo.com>
References: <12fea0627c29480bbef183471e61b8ee@EX01.highgo.com> <62630FA5-1611-4EBD-B6BC-01780A4E8853@hoplasoftware.com> <ae1387f04eb24cd29760751458117a51@EX01.highgo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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