Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aLekc-0004LX-Oo for pgsql-odbc@arkaria.postgresql.org; Tue, 19 Jan 2016 22:27:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aLekc-0004sW-B1 for pgsql-odbc@arkaria.postgresql.org; Tue, 19 Jan 2016 22:27:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aLekF-0004TL-NI for pgsql-odbc@postgresql.org; Tue, 19 Jan 2016 22:27:23 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aLekD-0001Pt-8P for pgsql-odbc@postgresql.org; Tue, 19 Jan 2016 22:27:23 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 077CE4008DE for ; Tue, 19 Jan 2016 14:27:13 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 588DD6B0; Tue, 19 Jan 2016 19:27:11 -0300 (CLT) Date: Tue, 19 Jan 2016 19:27:11 -0300 From: Alvaro Herrera To: pgsql-odbc@postgresql.org Subject: [Raiford@labware.com: float8 column size defined as 15 instead of 53?] Message-ID: <20160119222711.GA261243@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) 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 ----- 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: 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