pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Reilly <sreilly@cnri.Reston.Va.US>
To: interfaces postgres <pgsql-interfaces@postgreSQL.org>
Subject: binary insert with JDBC
Date: Mon, 11 May 1998 18:08:45 -0400
Message-ID: <355776ED.D161D88B@cnri.reston.va.us> (raw)

Can anyone tell me how to insert binary data into
a postgres table using JDBC?  What type field should I use?
Most importantly, how do I create an SQL statement with
binary data?  I thought this could be done with a 
PreparedStatement and setBytes() but it doesn't seem to
be implemented in postgres.PreparedStatement.  Is there
some way to encode the binary value into the SQL string
(like hex encoding or something)?

I looked through the docs but couldn't find anything
related to this, but it seems like it might be a common
problem.

Thanks,
Sean



view thread (5+ messages)  latest in thread

Message-ID: <355776ED.D161D88B@cnri.reston.va.us>
Permalink:  ../355776ED.D161D88B@cnri.reston.va.us/
Also on:    postgresql.org/message-id/355776ED.D161D88B@cnri.reston.va.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: sreilly@cnri.Reston.Va.US
  Subject: Re: binary insert with JDBC
  In-Reply-To: <355776ED.D161D88B@cnri.reston.va.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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