pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
NULL values and Java JDBC
3+ messages / 2 participants
[nested] [flat]

* NULL values and Java JDBC
@ 2022-09-30 15:46 Matthias Apitz <guru@unixarea.de>
  2022-09-30 15:56 ` Re: NULL values and Java JDBC Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Matthias Apitz @ 2022-09-30 15:46 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org


Hello,

Columns may contain NULL values. The ecpg for pre-compiling ESQL/C code
has an option to let return NULL values in CHAR columns as empty strings ""
and INTEGER as INT_MIN (-0x7fffffff - 1) values. Is there a similar
option for Java JDBC?

Thanks

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub





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

* Re: NULL values and Java JDBC
  2022-09-30 15:46 NULL values and Java JDBC Matthias Apitz <guru@unixarea.de>
@ 2022-09-30 15:56 ` Rob Sargent <robjsargent@gmail.com>
  2022-09-30 16:25   ` Re: NULL values and Java JDBC Matthias Apitz <guru@unixarea.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Rob Sargent @ 2022-09-30 15:56 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 9/30/22 09:46, Matthias Apitz wrote:
> Hello,
>
> Columns may contain NULL values. The ecpg for pre-compiling ESQL/C code
> has an option to let return NULL values in CHAR columns as empty strings ""
> and INTEGER as INT_MIN (-0x7fffffff - 1) values. Is there a similar
> option for Java JDBC?
>
> Thanks
>
> 	matthias
>
Have you looked at java.sql.PreparedStatement.setNull() or .setObject() etc?

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

* Re: NULL values and Java JDBC
  2022-09-30 15:46 NULL values and Java JDBC Matthias Apitz <guru@unixarea.de>
  2022-09-30 15:56 ` Re: NULL values and Java JDBC Rob Sargent <robjsargent@gmail.com>
@ 2022-09-30 16:25   ` Matthias Apitz <guru@unixarea.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Matthias Apitz @ 2022-09-30 16:25 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

El día viernes, septiembre 30, 2022 a las 09:56:07a. m. -0600, Rob Sargent escribió:

> On 9/30/22 09:46, Matthias Apitz wrote:
> > Hello,
> > 
> > Columns may contain NULL values. The ecpg for pre-compiling ESQL/C code
> > has an option to let return NULL values in CHAR columns as empty strings ""
> > and INTEGER as INT_MIN (-0x7fffffff - 1) values. Is there a similar
> > option for Java JDBC?
> > 

> Have you looked at java.sql.PreparedStatement.setNull() or .setObject() etc?

I was thinking more in a general setting of such feature (like ecpg does
it for ESQL/C) and not addressing such problem on any single statement
or object.

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub





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


end of thread, other threads:[~2022-09-30 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 15:46 NULL values and Java JDBC Matthias Apitz <guru@unixarea.de>
2022-09-30 15:56 ` Rob Sargent <robjsargent@gmail.com>
2022-09-30 16:25   ` Matthias Apitz <guru@unixarea.de>

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