Received: from waco2.calpha.com (waco2.calpha.com [208.232.233.3]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB33oaF69788 for ; Sat, 2 Dec 2000 22:50:36 -0500 (EST) (envelope-from Greg@10happythings.com) Received: from 10happythings.com (gspeegle.t1-s.wireless.calpha.com [63.80.26.25] (may be forged)) by waco2.calpha.com (8.10.1/8.10.1) with ESMTP id eB33oV719322; Sat, 2 Dec 2000 21:50:31 -0600 Message-ID: <3A29C2F9.3010101@10happythings.com> Date: Sat, 02 Dec 2000 21:50:17 -0600 From: Greg Speegle User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001108 Netscape6/6.0 X-Accept-Language: en MIME-Version: 1.0 To: "Bryan (Mailing Lists)" CC: pgsql-interfaces@postgresql.org Subject: Re: JDBC and long TEXT fields References: <200012011652.WAA08483@tcs.com> <012d01c05c66$0108d6f0$c6290218@workhorse> <002901c05cd9$cd8cf6c0$54ed90cc@netmeme.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200012/10 X-Sequence-Number: 347 There is actually an 8K (or so) limit to text field length. Although I believe that is going away soon, if it hasn't already. For text fields of that length you have to use Blobs. In fact, as I understand it, eventually the JDBC driver will do this for you automatically. Greg Speegle Baylor University Bryan (Mailing Lists) wrote: > I am trying to insert rows into a table containing a field of type "TEXT". > The documentation says there is no limit to the size of this field; yet, > when I try to insert or update a row with a field contents of around 10k, I > get an error from the JDBC driver: > > The SQL Statement is too long - insert into Customer_History (id, > id_customer, id_admin, timestamp, description) values (2021, 37515, null, > '2000-12-02 21:29:48.279', '...very very very long TEXT field') > > at org.postgresql.Connection.ExecSQL(Connection.java:324) > at org.postgresql.jdbc2.Statement.execute(Statement.java:273) > at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73) > at > org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java: > 126) > > > I am using jdbc7.0.2-1.2.jar. > > Any help would be appreciated. > > Thank you in advance, > Bryan > > > >