From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-odbc@postgresql.org
Subject: [Raiford@labware.com: float8 column size defined as 15 instead of 53?]
Date: Tue, 19 Jan 2016 19:27:11 -0300
Message-ID: <20160119222711.GA261243@alvherre.pgsql> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
----- Forwarded message from Raiford@labware.com -----
Date: Tue, 19 Jan 2016 12:27:33 -0700
From: Raiford@labware.com
To: pgsql-odbc-owner@postgresql.org
Subject: float8 column size defined as 15 instead of 53?
Message-ID: <OFA97EBADB.D2727DE7-ON85257F3F.00697E76-87257F3F.006A723C@labware.com>
I'm seeing that the columns defined as float8 in Postgres are being
described as SQL_FLOAT(15) instead of SQL_FLOAT(53). From what I can
tell, according to the ODBC spec, the column size should be reported as
binary precision, but the Postgres ODBC driver is reporting the decimal
precision.
https://msdn.microsoft.com/en-us/library/ms710150%28v=vs.85%29.aspx
"SQL_FLOAT FLOAT(p) Signed, approximate, numeric value with a binary
precision of at least p. (The maximum precision is driver-defined.)[5]"
Unfortunately I'm not running on a current ODBC driver and it would be
very inconvenient for me to load it at this moment. Could someone with
the latest driver verify whether or not SQLDescribeCol(),
SQLGetTypeInfo(), or SQLColAttribute() still report this with the decimal
precision?
I am happy to add a kludge to my code to treat numbers <= 15 as decimal
precision, but at some point it would be nice to see this be fixed if it
hasn't already.
I'm currently running the PostgreSQL Unicode 9.01.01.00 driver from
30-Dec-2011. I know it is quite old, so I'd be happy to hear that this is
already resolved. I'd also be happy to hear that I've misunderstood the
spec and would love clarification. For what its worth, I do see that both
SQL Server and Oracle are reporting binary precision.
Thank you,
Jon
www.labware.com
Results Count
----- End forwarded message -----
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
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: alvherre@alvh.no-ip.org
Subject: Re: [Raiford@labware.com: float8 column size defined as 15 instead of 53?]
In-Reply-To: <20160119222711.GA261243@alvherre.pgsql>
References: <20160119222711.GA261243@alvherre.pgsql>
* 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