pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Christoph Berg <christoph.berg@credativ.de>
To: PostgreSQL ODBC <pgsql-odbc@postgresql.org>
Subject: Re: 09.03.0400 broken on 32bit
Date: Thu, 13 Nov 2014 23:40:36 +0200
Message-ID: <54652554.1060804@vmware.com> (raw)
In-Reply-To: <20141112122146.GD9584@msg.credativ.de>
References: <20141112122146.GD9584@msg.credativ.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

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



view thread (2+ messages)

Message-ID: <54652554.1060804@vmware.com>
Permalink:  ../54652554.1060804@vmware.com/
Also on:    postgresql.org/message-id/54652554.1060804@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: hlinnakangas@vmware.com, christoph.berg@credativ.de
  Subject: Re: 09.03.0400 broken on 32bit
  In-Reply-To: <54652554.1060804@vmware.com>
  References: <20141112122146.GD9584@msg.credativ.de> <54652554.1060804@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox