From: | Peter T Mount <peter(at)retep(dot)org(dot)uk> |
---|---|
To: | Brian P Millett <bpm(at)ec-group(dot)com> |
Cc: | postgres <hackers(at)postgresql(dot)org> |
Subject: | Re: SIGBUS in AllocSetAlloc & jdbc |
Date: | 1999-04-29 17:44:19 |
Message-ID: | Pine.LNX.4.04.9904291836390.2109-100000@maidast.retep.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 29 Apr 1999, Brian P Millett wrote:
> Peter, I hope this long and boring message can shed some light on my
> difficulties getting jdbc & postgres6.5b1(current snapshot) to work
> with blobs. I have NO problem with text, numeric, etc. Just blobs &
> the LO interface.
>
> I feel that it is a 64 vs 32 bit memory management problem.
At first glance, the JDBC code looks ok. In fact it is similar to the
ImageViewer example that's included with the source.
Do you get the same problem when using ImageViewer?
> // Getting the value of the item_picture column and
> // displaying it
> System.err.println("Got oid "+queryResults.getInt(2));
> byte itemPictureArray [] = queryResults.getBytes(2);
> if (itemPictureArray != null) {
> Image img =
> Toolkit.getDefaultToolkit().createImage(itemPictureArray);
> itemPictureCanvas.setImage(img);
> itemPictureCanvas.repaint();
> }
Using an array is perfectly valid, and the driver does support this method
of getting an Image from a BLOB.
Tip: The JDBC spec says you should only read a field once. However, with
our driver, this is ok.
I'm not sure about the backend, but the JDBC side looks fine.
Peter
--
Peter T Mount peter(at)retep(dot)org(dot)uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Lewis | 1999-04-29 18:27:31 | PLpgSQL Stat Problem |
Previous Message | The Hermit Hacker | 1999-04-29 17:15:28 | Re: [HACKERS] v6.5 Release Date ... |