org.mmbase.module.database.support
Class PostgreSQL72

java.lang.Object
  |
  +--org.mmbase.module.database.support.PostgreSQL71
        |
        +--org.mmbase.module.database.support.PostgreSQL72
All Implemented Interfaces:
MMJdbc2NodeInterface

public class PostgreSQL72
extends PostgreSQL71

More info for differences between the versions: http://www.postgresql.org/idocs/index.php?jdbc-binary-data.html 7.2 is the first release of the JDBC Driver that supports the bytea data type. The introduction of this functionality in 7.2 has introduced a change in behavior as compared to previous releases. In 7.2 the methods getBytes(), setBytes(), getBinaryStream(), and setBinaryStream() operate on the bytea data type. In 7.1 these methods operated on the OID data type associated with Large Objects. It is possible to revert the driver back to the old 7.1 behavior by setting the compatible property on the Connection to a value of 7.1 To use the bytea data type you should simply use the getBytes(), setBytes(), getBinaryStream(), or setBinaryStream() methods. To use the Large Object functionality you can use either the LargeObject API provided by the PostgreSQL JDBC Driver, or by using the getBLOB() and setBLOB() methods. Important: For PostgreSQL, you must access Large Objects within an SQL transaction. You would open a transaction by using the setAutoCommit() method with an input parameter of false. Note: In a future release of the JDBC Driver, the getBLOB() and setBLOB() methods may no longer interact with Large Objects and will instead work on bytea data types. So it is recommended that you use the LargeObject API if you intend to use Large Objects. Postgresql driver for MMBase

Version:
$Id: PostgreSQL72.java,v 1.1.2.1 2003/03/27 17:31:44 robmaris Exp $
Author:
Eduard Witteveen

Fields inherited from class org.mmbase.module.database.support.PostgreSQL71
mmb
 
Constructor Summary
PostgreSQL72()
           
 
Method Summary
 byte[] getShortedByte(java.lang.String tableName, java.lang.String fieldname, int number)
           
protected  boolean setValuePreparedStatement(java.sql.PreparedStatement stmt, MMObjectNode node, java.lang.String key, int i)
           
 
Methods inherited from class org.mmbase.module.database.support.PostgreSQL71
addField, changeField, commit, create, created, createObjectTable, decodeDBnodeField, decodeDBnodeField, drop, getAllowedField, getConnection, getDBByte, getDBKey, getDBText, getDisallowedField, getMMNodeSearch2SQL, getNumberString, getOTypeString, getOwnerString, getShortedText, init, insert, isAllowedParentBuilder, registerParentBuilder, removeField, removeNode, setDBByte, updateTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgreSQL72

public PostgreSQL72()
Method Detail

setValuePreparedStatement

protected boolean setValuePreparedStatement(java.sql.PreparedStatement stmt,
                                            MMObjectNode node,
                                            java.lang.String key,
                                            int i)
                                     throws java.sql.SQLException
Overrides:
setValuePreparedStatement in class PostgreSQL71

getShortedByte

public byte[] getShortedByte(java.lang.String tableName,
                             java.lang.String fieldname,
                             int number)
Overrides:
getShortedByte in class PostgreSQL71


MMBase build 1.6.5.20030923