Re: JDBC and long TEXT fields

From: Greg Speegle <Greg(at)10happythings(dot)com>
To: "Bryan (Mailing Lists)" <bryan_lists(at)netmeme(dot)org>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: JDBC and long TEXT fields
Date: 2000-12-03 03:50:17
Message-ID: 3A29C2F9.3010101@10happythings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


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
>
>
>
>

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Thomas Lockhart 2000-12-03 04:28:44 Re: JDBC and long TEXT fields
Previous Message Bryan (Mailing Lists) 2000-12-03 03:33:29 JDBC and long TEXT fields