X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1F77B8B9E30 for ; Tue, 22 Feb 2005 17:43:49 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45425-03 for ; Tue, 22 Feb 2005 17:43:39 +0000 (GMT) Received: from mail.interprose.com (mail.interprose.com [208.186.79.3]) by svr1.postgresql.org (Postfix) with ESMTP id 120248B9B5D for ; Tue, 22 Feb 2005 17:43:39 +0000 (GMT) Received: from watto.interprose.net (watto.interprose.net [192.168.1.164]) by mail.interprose.com (Postfix) with ESMTP id 4B4A858005A for ; Tue, 22 Feb 2005 09:43:40 -0800 (PST) Subject: Multi-Demensional Array Support. From: Greg Johnson To: pgsql-jdbc@postgresql.org Content-Type: text/plain Date: Tue, 22 Feb 2005 09:43:37 -0800 Message-Id: <1109094217.6541.24.camel@watto.interprose.net> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/158 X-Sequence-Number: 12338 I started hacking in multi-dimensional array support into the driver. However, with the getArray() function I have to return an ArrayList of ArrayLists (or Object[] of Object[]) instead of the native type Object [][] for example. I was wondering what you guys/gals thoughts are on the this? As an application developer I personally would like to get ArrayLists of ArrayLists back. It seems that unless you what to have a whole bunch of nasty "if" logic that is the only way to implement multi-dimensional arrays cleanly. Example: if array_dims==1 returnVal = String[]; if array_dims==2 returnVal = String[][]; else if array_dims==3 returnVal = String[][][]; .. but I am not java guru so if there is a better way let me know. Also, is there a reason why a regular expression is not used to parse out the array string returned from postgresql? Thanks, I hope I can help out! Greg