From: Kris Jurka <books@ejurka.com>
To: Brent Friedman <ledfut@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Any examples for Postgresql 8.0 using jdbc type 2/3 driver with blobs?
Date: Fri, 1 Feb 2008 15:42:53 -0500 (EST)
Message-ID: <Pine.BSO.4.64.0802011538460.5384@leary.csoft.net> (raw)
In-Reply-To: <94fa210b0801311324u2eb9013eq5ba8b54cd8a153f3@mail.gmail.com>
References: <94fa210b0801311324u2eb9013eq5ba8b54cd8a153f3@mail.gmail.com>
On Thu, 31 Jan 2008, Brent Friedman wrote:
> I made several attempts today to get an example of a blob insert via jdbc
> working today, but ran into several errors. I tried both oid and bytea data
> types, and tried the LargeObject manager/methods. [The bytea type probably
> won't ultimately work for me - we need to be able to insert blobs of a few
> megs each.] We use 8.0 in production, so newer examples with 8.1/8.2/8.3
> specific implementations wouldn't help very much.
>
> So, any ideas where I can find working examples of jdbc/blob operations?
>
http://jdbc.postgresql.org/documentation/83/binary-data.html
The sample code here using the LargeObjectManager API should work.
Checking the test suite is also a reasonable place to look for examples.
See readWrite here:
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/jdbc/pgjdbc/org/postgresql/test/jdbc3/Jdbc3BlobTest.java...
Kris Jurka
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, ledfut@gmail.com
Subject: Re: Any examples for Postgresql 8.0 using jdbc type 2/3 driver with blobs?
In-Reply-To: <Pine.BSO.4.64.0802011538460.5384@leary.csoft.net>
References: <94fa210b0801311324u2eb9013eq5ba8b54cd8a153f3@mail.gmail.com> <Pine.BSO.4.64.0802011538460.5384@leary.csoft.net>
* 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