diff -urN pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java java/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
--- pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java	2004-08-11 12:34:39.000000000 +0200
+++ java/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java	2004-09-18 23:36:21.000000000 +0200
@@ -3501,6 +3501,7 @@
 		byte b9[] = connection.encodeString("9");
 		byte b10[] = connection.encodeString("10");
 		byte bf[] = connection.encodeString("f");
+		byte bt[] = connection.encodeString("t");		
 		byte bnn[] = connection.encodeString(Integer.toString(java.sql.DatabaseMetaData.typeNoNulls));
 		byte bts[] = connection.encodeString(Integer.toString(java.sql.DatabaseMetaData.typeSearchable));
 
@@ -3516,7 +3517,12 @@
 			tuple[8] = bts;
 			tuple[9] = bf; // false for now - it's signed
 			tuple[10] = bf; // false for now - must handle money
-			tuple[11] = bf; // false for now - handle autoincrement
+			if ( typname.equals("int4") || typname.equals("int8") ) {
+			  tuple[11] = bt;
+			}
+			else {
+			  tuple[11] = bf;
+			}
 			// 12 - LOCAL_TYPE_NAME is null
 			// 13 & 14 ?
 			// 15 & 16 are unused so we return null
diff -urN pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java java/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
--- pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java	2004-08-05 12:01:21.000000000 +0200
+++ java/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java	2004-09-19 01:11:00.000000000 +0200
@@ -15,7 +15,8 @@
 
 	private Hashtable tableNameCache;
 	private Hashtable schemaNameCache;
-
+	private Hashtable autoIncrementNameCache;
+	
 	/*
 	 *	Initialise for a result with a tuple set and
 	 *	a field descriptor set
@@ -42,6 +43,7 @@
 	/*
 	 * Is the column automatically numbered (and thus read-only)
 	 * I believe that PostgreSQL does not support this feature.
+	 * It's serial in PostgreSQL
 	 *
 	 * @param column the first column is 1, the second is 2...
 	 * @return true if so
@@ -49,7 +51,59 @@
 	 */
 	public boolean isAutoIncrement(int column) throws SQLException
 	{
-		return false;
+		Field   field    = getField(column);
+		int     tableOID = field.getTableOid();
+
+		if (field.getTableOid() == 0)
+		{
+			return false;
+		}
+
+		String tabID = Integer.toString(tableOID) + "_" + Integer.toString(column);
+
+		if (autoIncrementNameCache == null)
+		{
+			autoIncrementNameCache = new Hashtable();
+		}
+		
+		Boolean autoIncrementVal = (Boolean) autoIncrementNameCache.get(tabID);
+		
+		if (autoIncrementVal != null)
+		{
+			return autoIncrementVal.booleanValue();
+		} 
+		else
+		{
+			ResultSet res = null;
+			PreparedStatement ps = null;
+			try
+			{
+				String sql = "SELECT def.adsrc FROM pg_catalog.pg_class c " +
+				             "JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) " +
+					     "LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) " +
+					     "WHERE c.oid = ? and attnum = ? AND def.adsrc LIKE '%nextval(%'";
+				ps = ((Connection)connection).prepareStatement(sql);
+				ps.setInt(1, tableOID);
+				ps.setInt(2, column);
+				res = ps.executeQuery();
+				if (res.next())
+				{
+					autoIncrementNameCache.put(tabID, Boolean.TRUE);
+					return true;
+				}
+				else
+				{
+					autoIncrementNameCache.put(tabID, Boolean.FALSE);
+					return false;
+				}
+			} finally
+			{
+				if (res != null)
+					res.close();
+				if (ps != null)
+					ps.close();
+			}
+		}		
 	}
 
 	/*
