| | | | | | | | | | | | | | Article Summary
Title: | | PostgreSQL JDBC Drivers and bytea Binary Data | Description: | How to use PostgreSQL <code>bytea</code> data types with JDBC drivers | Key Words: | postgresql, bytea, binary, data, jdbc, driver | Type: | FAQs | Category: | PostgreSQL Database | Last Updated: | 2004-01-08 04:46:35 |
| | | | |
| | | | PostgreSQL JDBC Drivers and bytea Binary Data
We have implemented a database application that needs to upload binary files
and store them in a PostgreSQL database. I checked the version of the
database: 7.1.3. This database supports bytea entries. The
problem is that the PreparedStatemement.setBinaryStream()
function throws an "InputStream as parameter not supported"
exception. This means (I think) that the PostgreSQL driver set in your
CLASSPATH isn't the latest one for this PostgreSQL version.
How do I put my own driver in my Tomcat lib directory?
Regardless which version of the PostgreSQL backend, we recommend using at least the 7.3 JDBC driver. The JDBC driver included in PostgreSQL 7.3 has much improved support for bytea data type. You may either use one of our existing JDBC drivers by Changing Your PostgreSQL JDBC Driver or Install Your Own JDBC Driver.
| | | | |
| | | | | Copyright © 2000-2024 AO Industries, Inc. |
|