Index: Encoding.java
===================================================================
RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/core/Encoding.java,v
retrieving revision 1.21
diff -u -r1.21 Encoding.java
--- Encoding.java       4 Jul 2005 02:18:32 -0000       1.21
+++ Encoding.java       3 Mar 2006 08:45:12 -0000
@@ -175,6 +175,10 @@
       */
      public String decode(byte[] encodedString, int offset, int length) throws IOException
      {
+        if(encodedString == null || encodedString.length == 0) {
+            return ""; // do not create new String() use constant String
+        }
+
          if (encoding == null)
              return new String(encodedString, offset, length);

