Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group