Re: How to insert huge string from file to text field via JDBC ? - Mailing list pgsql-jdbc

From liuyuanyuan
Subject Re: How to insert huge string from file to text field via JDBC ?
Date
Msg-id 201308151710325164948@highgo.com.cn
Whole thread Raw
In response to How to insert huge string from file to text field via JDBC ?  (liuyuanyuan <liuyuanyuan@highgo.com.cn>)
List pgsql-jdbc
        Thanks of all !
      Yes, this is unusual. But since a text field could store
up to 2GB , then I think  there must be a way to insert values up to 2G
in JDBC. I know about Large Object and bytea, and I just test text
datatype and want to get a exact result about whether we can insert
long string from huge file into text field or whst's the  maximum size.
     Hope to get more ideas from you.
 
 Best Regards! 
 Yours,
 Liu Yuanyuan
 
danap wrote:
>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.
 
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!
 
 
 

pgsql-jdbc by date:

Previous
From: Pawel Veselov
Date:
Subject: Re: PGConnectionPoolDataSource referencing problem
Next
From: Andreas Rudolph
Date:
Subject: Re: BUG org.postgresql.Driver.connect() distorts InterruptedException