From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Rajyalakshmi Sareddy <rajyalakshmi(dot)x(dot)sareddy(at)gsk(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Regarding setClob and getclobval methods in PostgreSQL |
Date: | 2025-01-31 23:42:50 |
Message-ID: | f260c14e9e70e43cc956e99dc11ca6ce16d73c57.camel@cybertec.at |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Fri, 2025-01-31 at 11:35 +0000, Rajyalakshmi Sareddy wrote:
> We are currently migrating the code from oracle to postgresql and using jdbc
> jar ispostgresql-42.7.4.jar. But for code migration, we are getting errors
> like org.postgresql.jdbc.PgPreparedStatement.setClob(int, Reader) is not yet
> implemented.
>
> Could you please confirm on setClob and getclobval methods are implemented
> in postgresql-42.7.4 jar. If not implemented, could you please suggest
> with alternate methods.
I can only confirm that that method is *not* implemented.
You would have to use setClob(int parameterIndex, Clob x) instead.
But really, *do not* use any of the getClob and setClob methods, because they
use Large Objects in PostgreSQL, and you should avoid Large Objects.
Use setBinaryStream(int parameterIndex, InputStream x) instead, so that
you can use "bytea" in the database.
By the way, there is a specific mailing list for the JDBC driver, where you
may get better answers.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Rajyalakshmi Sareddy | 2025-02-03 09:11:15 | RE: Regarding setClob and getclobval methods in PostgreSQL |
Previous Message | Tom Lane | 2025-01-31 20:42:49 | Re: btree_gin, bigint and number literals |