Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xp292-0002IR-GE for pgsql-odbc@arkaria.postgresql.org; Thu, 13 Nov 2014 21:41:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xp291-0003BY-5Y for pgsql-odbc@arkaria.postgresql.org; Thu, 13 Nov 2014 21:41:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xp290-0003BR-Be for pgsql-odbc@postgresql.org; Thu, 13 Nov 2014 21:41:34 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xp28o-0001g8-Sj for pgsql-odbc@postgresql.org; Thu, 13 Nov 2014 21:41:31 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 713702850E; Thu, 13 Nov 2014 13:41:17 -0800 (PST) Received: from EX13-CAS-013.vmware.com (EX13-CAS-013.vmware.com [10.113.191.65]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 68FB341175; Thu, 13 Nov 2014 13:41:17 -0800 (PST) Received: from EX13-MBX-024.vmware.com (10.113.191.44) by EX13-MBX-013.vmware.com (10.113.191.33) with Microsoft SMTP Server (TLS) id 15.0.775.38; Thu, 13 Nov 2014 13:41:02 -0800 Received: from [192.168.1.90] (10.113.160.246) by EX13-MBX-024.vmware.com (10.113.191.44) with Microsoft SMTP Server (TLS) id 15.0.775.38; Thu, 13 Nov 2014 13:41:02 -0800 Message-ID: <54652554.1060804@vmware.com> Date: Thu, 13 Nov 2014 23:40:36 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Christoph Berg , PostgreSQL ODBC Subject: Re: 09.03.0400 broken on 32bit References: <20141112122146.GD9584@msg.credativ.de> In-Reply-To: <20141112122146.GD9584@msg.credativ.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.113.160.246] X-ClientProxiedBy: EX13-CAS-013.vmware.com (10.113.191.65) To EX13-MBX-024.vmware.com (10.113.191.44) X-Pg-Spam-Score: -7.9 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 11/12/2014 02:21 PM, Christoph Berg wrote: > Hi, > > 09.03.0400 is broken on all 32bit architectures: > > https://buildd.debian.org/status/logs.php?pkg=psqlodbc&ver=1%3A09.03.0400-1 > > ... > > *** /home/cbe/projects/postgresql/psqlodbc/psqlodbc/test/expected/result-conversions.out 2014-10-26 07:08:38.000000000 +0100 > --- /home/cbe/projects/postgresql/psqlodbc/psqlodbc/test/results/result-conversions.out 2014-11-12 13:18:49.990297759 +0100 > *************** > *** 356,371 **** > 'textdata' (text) as SQL_C_INTERVAL_MINUTE_TO_SECOND: interval sign: 0 unknown interval type: 0 > '3234567901' (oid) as SQL_C_CHAR: 3234567901 > '3234567901' (oid) as SQL_C_WCHAR: 3234567901 > ! '3234567901' (oid) as SQL_C_SSHORT: -26915 > ! '3234567901' (oid) as SQL_C_USHORT: 38621 > ! '3234567901' (oid) as SQL_C_SLONG: -1060399395 > '3234567901' (oid) as SQL_C_ULONG: 3234567901 > '3234567901' (oid) as SQL_C_FLOAT: 3234567936.000000 > '3234567901' (oid) as SQL_C_DOUBLE: 3234567901.000000 > ! '3234567901' (oid) as SQL_C_BIT: 221 > ! '3234567901' (oid) as SQL_C_STINYINT: -35 > ! '3234567901' (oid) as SQL_C_UTINYINT: 221 > ! '3234567901' (oid) as SQL_C_SBIGINT: 3234567901 > '3234567901' (oid) as SQL_C_UBIGINT: 3234567901 > '3234567901' (oid) as SQL_C_BINARY: SQLGetData failed > 07006=Received an unsupported type from Postgres. > --- 356,371 ---- > 'textdata' (text) as SQL_C_INTERVAL_MINUTE_TO_SECOND: interval sign: 0 unknown interval type: 0 > '3234567901' (oid) as SQL_C_CHAR: 3234567901 > '3234567901' (oid) as SQL_C_WCHAR: 3234567901 > ! '3234567901' (oid) as SQL_C_SSHORT: -1 > ! '3234567901' (oid) as SQL_C_USHORT: 65535 > ! '3234567901' (oid) as SQL_C_SLONG: 2147483647 > '3234567901' (oid) as SQL_C_ULONG: 3234567901 > '3234567901' (oid) as SQL_C_FLOAT: 3234567936.000000 > '3234567901' (oid) as SQL_C_DOUBLE: 3234567901.000000 > ! '3234567901' (oid) as SQL_C_BIT: 255 > ! '3234567901' (oid) as SQL_C_STINYINT: -1 > ! '3234567901' (oid) as SQL_C_UTINYINT: 255 > ! '3234567901' (oid) as SQL_C_SBIGINT: -1060399395 > '3234567901' (oid) as SQL_C_UBIGINT: 3234567901 > '3234567901' (oid) as SQL_C_BINARY: SQLGetData failed > 07006=Received an unsupported type from Postgres. Hmm. The difference is in the conversion of an integer value larger than 2^31, to a C type that's not large enough to hold it. According to the ODBC spec, that's supposed to raise an error, sqlstate 22015, and the result is undefined. (http://msdn.microsoft.com/en-us/library/ms712567%28v=vs.85%29.aspx). I actually removed those particular test cases after the 09.03.0400 release, when I added tests for large objects. The above OID conversion tests started to behave differently after the "lo" domain, for large objects. So the issue should be resolved in git master already, by accident. The real issue here is that the driver doesn't raise an error when a numeric value's whole part is truncated. - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc