Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V9bdL-0006hQ-6P for pgsql-jdbc@arkaria.postgresql.org; Wed, 14 Aug 2013 14:01:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V9bdK-0006Qh-Kj for pgsql-jdbc@arkaria.postgresql.org; Wed, 14 Aug 2013 14:01:06 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V9bdI-0006OL-Po for pgsql-jdbc@postgresql.org; Wed, 14 Aug 2013 14:01:04 +0000 Received: from outbound.vnet-inc.com ([216.146.104.103]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V9bdB-0006SH-TW for pgsql-jdbc@postgresql.org; Wed, 14 Aug 2013 14:01:03 +0000 Received: from [192.168.157.132] (unknown [65.19.243.151]) by outbound.vnet-inc.com (Postfix) with ESMTP id 31834734B; Wed, 14 Aug 2013 08:00:42 -0600 (MDT) Message-ID: <520B8C5B.5000501@ttc-cmc.net> Date: Wed, 14 Aug 2013 07:55:39 -0600 From: dmp User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.13) Gecko/20100914 SeaMonkey/2.0.8 MIME-Version: 1.0 To: liuyuanyuan , PostgreSQL JDBC Subject: Re: How to insert huge string from file to text field via JDBC ? References: <2013081417294966226913@highgo.com.cn> In-Reply-To: <2013081417294966226913@highgo.com.cn> Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org I have not tried with that size of document, but using a standard InputReader seems to work fine. Just setup a FileReader, buffer into a StringBuffer then when finished use the stringBuffer.toString() in the preparedStatement. danap. liuyuanyuan wrote: > Hi, > Now I need to insert a huge string from a huge file (e.g. a 1 GB text document) to a TEXT type field. > But I don't know any other way to insert string except setString() for preparedStatement. > Anyone know about this, please write to me. Thanks in advance! > > Best Wish! > > Yours, > Liu Yuanyuan > August 14,2013 > -------------- > 刘媛媛 > 山东瀚高基础软件股份有限公司 > 研发中心 > QQ:73129616 -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc