From: Sean Reilly <sreilly@cnri.Reston.Va.US>
To: Peter Mount <peter@maidstone.gov.uk>
Cc: 'interfaces postgres' <pgsql-interfaces@postgreSQL.org>
Cc: 'Peter at home' <peter@retep.org.uk>
Subject: Re: [INTERFACES] binary insert with JDBC
Date: Wed, 13 May 1998 18:08:27 -0400
Message-ID: <355A19DA.CB496923@cnri.reston.va.us> (raw)
References: <714F8949628ED1119E0F0060082C52F5095246@vesta.maidstone.gov.uk>
Hello,
Thanks for taking the time to reply =)
I'm using version 6.3.2. I just tried using blobs and it seems to
take an unusually long time to retrieve the blobs (after the record
has been retrieved). Since I know my data will be under 512 bytes,
is there any way I can store it directly in a field in the table so
I can avoid the extra lookup? If not, is there any way that I can
speed up the retrieval of the blob (insertion speed doesn't matter)?
I've already tried creating an index for the oid, but it didn't help
much.
Thanks,
Sean
Peter Mount wrote:
>
> Ok, which version of Postgres are you using?
>
> To use Blobs (Binary Large Objects) currently you need to use the oid type.
>
> Take a look at the example.blobtest and example.ImageViewer classes as these
> deal with Blobs.
>
> --
> Peter T Mount, peter@maidstone.gov.uk, peter@retep.org.uk
> Please note that this is from my works email. If you reply, please cc my
> home address.
>
> -----Original Message-----
> From: owner-pgsql-interfaces@hub.org
> [mailto:owner-pgsql-interfaces@hub.org]On Behalf Of Sean Reilly
> Sent: Monday, May 11, 1998 11:09 PM
> To: interfaces postgres
> Subject: [INTERFACES] binary insert with JDBC
>
> 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
--
Sean Reilly | Corporation for National Research Initiatives
Programmer | sreilly@cnri.reston.va.us
703.620.8990 x275 | http://www.cnri.reston.va.us
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, peter@maidstone.gov.uk, peter@retep.org.uk
Subject: Re: [INTERFACES] binary insert with JDBC
In-Reply-To: <355A19DA.CB496923@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