public inbox for [email protected]  
help / color / mirror / Atom feed
Regarding setClob and getclobval methods in PostgreSQL
4+ messages / 2 participants
[nested] [flat]

* Regarding setClob and getclobval methods in PostgreSQL
@ 2025-01-31 11:35  Rajyalakshmi Sareddy <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Rajyalakshmi Sareddy @ 2025-01-31 11:35 UTC (permalink / raw)
  To: pgsql-novice

Hi Team,

We are currently migrating the code from oracle to postgresql and using jdbc jar is postgresql-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.

Thanks and Regards
Rajyalakshmi Sareddy
Integration Developer
Middleware & Integration
GSK Tech
Hyderabad, India
[cid:[email protected]]

E: [email protected]<mailto:[email protected]>
M: +91 8309974485


GSK monitors email communications sent to and from GSK in order to protect GSK, our employees, customers, suppliers and business partners, from cyber threats and loss of GSK Information. GSK monitoring is conducted with appropriate confidentiality controls and in accordance with local laws and after appropriate consultation.


Attachments:

  [image/png] image001.png (4.3K, 3-image001.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Regarding setClob and getclobval methods in PostgreSQL
@ 2025-01-31 23:42  Laurenz Albe <[email protected]>
  parent: Rajyalakshmi Sareddy <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Laurenz Albe @ 2025-01-31 23:42 UTC (permalink / raw)
  To: Rajyalakshmi Sareddy <[email protected]>; 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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* RE: Regarding setClob and getclobval methods in PostgreSQL
@ 2025-02-03 09:11  Rajyalakshmi Sareddy <[email protected]>
  parent: Laurenz Albe <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Rajyalakshmi Sareddy @ 2025-02-03 09:11 UTC (permalink / raw)
  To: Laurenz Albe <[email protected]>; pgsql-novice

Hi,

Thank you for your response.

Can you please ping me specific mailing list for the JDBC driver so that I can get better solutions.

Thanks and Regards
Rajyalakshmi Sareddy
Integration Developer
Middleware & Integration
GSK Tech
Hyderabad, India
E: [email protected]
M: +91 8309974485


-----Original Message-----
From: Laurenz Albe <[email protected]>
Sent: Saturday, February 1, 2025 5:13 AM
To: Rajyalakshmi Sareddy <[email protected]>; [email protected]
Subject: Re: Regarding setClob and getclobval methods in PostgreSQL

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
GSK monitors email communications sent to and from GSK in order to protect GSK, our employees, customers, suppliers and business partners, from cyber threats and loss of GSK Information. GSK monitoring is conducted with appropriate confidentiality controls and in accordance with local laws and after appropriate consultation.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Regarding setClob and getclobval methods in PostgreSQL
@ 2025-02-03 09:19  Laurenz Albe <[email protected]>
  parent: Rajyalakshmi Sareddy <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Laurenz Albe @ 2025-02-03 09:19 UTC (permalink / raw)
  To: Rajyalakshmi Sareddy <[email protected]>; pgsql-novice

On Mon, 2025-02-03 at 09:11 +0000, Rajyalakshmi Sareddy wrote:
> Can you please ping me specific mailing list for the JDBC driver so that I can get better solutions.

The list is pgsql-jdbc.

Yours,
Laurenz Albe






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2025-02-03 09:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-01-31 11:35 Regarding setClob and getclobval methods in PostgreSQL Rajyalakshmi Sareddy <[email protected]>
2025-01-31 23:42 ` Laurenz Albe <[email protected]>
2025-02-03 09:11   ` Rajyalakshmi Sareddy <[email protected]>
2025-02-03 09:19     ` Laurenz Albe <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox