Re: SIGBUS in AllocSetAlloc & jdbc
От | Peter T Mount |
---|---|
Тема | Re: SIGBUS in AllocSetAlloc & jdbc |
Дата | |
Msg-id | Pine.LNX.4.04.9904291836390.2109-100000@maidast.retep.org.uk обсуждение исходный текст |
Ответ на | SIGBUS in AllocSetAlloc & jdbc (Brian P Millett <bpm@ec-group.com>) |
Ответы |
Re: [HACKERS] Re: SIGBUS in AllocSetAlloc & jdbc
|
Список | 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@retep.org.uk Main Homepage: http://www.retep.org.uk PostgreSQL JDBC Faq: http://www.retep.org.uk/postgresJava PDF Generator: http://www.retep.org.uk/pdf
В списке pgsql-hackers по дате отправления: