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

Statement setNull for Types.CLOB

From: "Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Statement setNull for Types.CLOB
Date: 2005-02-18 17:41:17
Message-ID: 49924.192.168.1.1.1108748477.squirrel@192.168.1.1 (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hello, I'm using PostgreSQL 8 and the 310 build of the 8.0 JDBC3 driver
with Hibernate. For 'text' columns in my database, I had mapped them to
the Hibernate "text" type. When attempting to set the value of a text
column to 'null' via a PreparedStatement Hibernate calls setNull() passing
the Types.CLOB as the SQL type. The Postgres driver is throwing an
exception, however, saying that type is unknown.

I can easily change the Hibernate mapping to "string", which would change
the SQL type passed to setNull() to Types.VARCHAR, but I was wondering if
Types.CLOB should be a supported value in the setNull() JDBC method?

I realize it might not be correct to think of the PostgreSQL text type as
a CLOB, so I just wanted some insight on this issue if possible.

Thanks,




Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2005-02-18 20:10:19
Subject: Re: Statement setNull for Types.CLOB
Previous:From: Kalle KivimaaDate: 2005-02-18 10:39:19
Subject: Hibernate + setObject() + boolean problem with a patch

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