Index: org/postgresql/jdbc2/AbstractJdbc2Array.java
===================================================================
RCS file: /cvsroot/jdbc/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Array.java,v
retrieving revision 1.29
diff -u -r1.29 AbstractJdbc2Array.java
--- org/postgresql/jdbc2/AbstractJdbc2Array.java	30 Sep 2011 10:08:17 -0000	1.29
+++ org/postgresql/jdbc2/AbstractJdbc2Array.java	22 Nov 2011 21:06:15 -0000
@@ -175,7 +175,7 @@

      private Object readBinaryArray(int index, int count) throws SQLException {
          int dimensions = ByteConverter.int4(fieldBytes, 0);
-        //int flags = ByteConverter.int4(fieldBytes, 4); // bit 0: 0=no-nulls, 1=has-nulls
+        int flags = ByteConverter.int4(fieldBytes, 4); // bit 0: 0=no-nulls, 1=has-nulls, bit 1: 0=variable-size objects, 2=fixed-size
          int elementOid = ByteConverter.int4(fieldBytes, 8);
          int pos = 12;
          int[] dims = new int[dimensions];
@@ -190,8 +190,12 @@
              dims[0] = Math.min(count, dims[0]);
          }
          Object arr = java.lang.reflect.Array.newInstance(elementOidToClass(elementOid), dims);
+        int len = -1;
+        if ((flags & 2) != 0) {
+            len = fixedBinaryLengthOfOid(elementOid);
+        }
          try {
-            storeValues((Object[]) arr, elementOid, dims, pos, 0, index);
+            storeValues((Object[]) arr, elementOid, dims, len, pos, 0, index);
          }
          catch (IOException ioe)
          {
@@ -200,18 +204,27 @@
          return arr;
      }

-    private int storeValues(final Object[] arr, int elementOid, final int[] dims, int pos, final int thisDimension, int index) throws SQLException, IOException {
+    private int storeValues(final Object[] arr, int elementOid, final int[] dims, int len, int pos, final int thisDimension, int index) throws SQLException, 
