Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 0372E1648183 for ; Fri, 30 Mar 2012 09:55:44 -0300 (ADT) Received: from sd.tpf.co.jp ([210.161.239.34]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SDbMh-0008QJ-V2 for pgsql-odbc@postgresql.org; Fri, 30 Mar 2012 12:55:43 +0000 Received: (qmail 30578 invoked by uid 512); 30 Mar 2012 12:55:22 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 30 Mar 2012 12:55:22 -0000 Received: from unknown (HELO ?192.168.24.54?) (183.76.20.202) by sd.tpf.co.jp with SMTP; 30 Mar 2012 12:55:22 -0000 Message-ID: <4F75AD38.2080601@tpf.co.jp> Date: Fri, 30 Mar 2012 21:55:20 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Barend_K=F6bben?= CC: "pgsql-odbc@postgresql.org" Subject: Re: Handling of Arrays broken..? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/30 X-Sequence-Number: 10811 Hi Barend, (2012/03/27 17:30), Barend Köbben wrote: > Hi, > > Since upgrading to PostgreSQL 9.1.2 and its psql-odbc driver (9.0.3.10), > the results of queries to arrays seems broken. I have an SQL 'items' > column of type character(3)[]. A 'normal' SQL query 'SELECT items FROM > table' results in a proper Array (shows in PgAdmin as {100,999,122} ). > > In ASP JavaScript the same query done in an ADODB connection... > > SQLcmd.CommandText = "SELECT items FROM table"; > var RecSet = SQLcmd.Execute; > > while (!RecSet.EOF&& !RecSet.BOF) { > var theItemsStr = RecSet.Fields.Item("items").Value; > > ...results in theItemsStr being '{10' > > The same code worked in an earlier installation with Postgres 8.4 and its > driver (version?). > > > By accident I found that the same thing with the SQL "SELECT items[1:99] > FROM table" does work correctly (even if the array only has 3 items). Is > this a bug that has been introduced in the new version of the driver, or > is there something else I missed...? Could you please try the drivers on testing for 9.1.0101 at http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/ ? regards, Inoue, Hiroshi