Re: Jdbc4ResultSet getClob and getBlob are calling getLong internally

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Nedim Cholich" <nedim(at)cholich(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Jdbc4ResultSet getClob and getBlob are calling getLong internally
Date: 2010-02-01 20:45:15
Message-ID: 4B66E8FB020000250002EDCC@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Nedim Cholich <nedim(at)cholich(dot)com> wrote:

> Yes, it's a TEXT column and yes I'm calling
> rs.getClob(columnName);
>
> What am I suppose to call instead?

In PostgreSQL a text column is not a BLOB or CLOB.
Try rs.getString(columnName);

For BLOB behavior, see large objects:

http://www.postgresql.org/docs/8.4/interactive/largeobjects.html

-Kevin

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Adel Chepkunov 2010-02-03 14:47:59 bad intro page for developers
Previous Message Nedim Cholich 2010-02-01 20:44:10 Re: Jdbc4ResultSet getClob and getBlob are calling getLong internally