Re: NUMERIC type makes trouble in MS Access - Mailing list pgsql-odbc

From Craig Ringer
Subject Re: NUMERIC type makes trouble in MS Access
Date
Msg-id CAMsr+YE1jrKGxu2BNGDxoQbFF39DM6TgU-p99NRM7pN2RBQyJA@mail.gmail.com
Whole thread Raw
In response to Re: NUMERIC type makes trouble in MS Access  ("Tobias Wendorff" <tobias.wendorff@tu-dortmund.de>)
Responses Re: NUMERIC type makes trouble in MS Access  ("Tobias Wendorff" <tobias.wendorff@tu-dortmund.de>)
List pgsql-odbc
On 28 May 2018 at 05:43, Tobias Wendorff <tobias.wendorff@tu-dortmund.de> wrote:

> All I understood so far is that PostgreSQL's NUMERIC without explicit
> precision sometimes overwhelms Access with too many digits after the
> decimal point. If that is accurate you may want to either complain to
> Microsoft about their insufficient implementation of DECIMAL or fix
> the schema of the source database.

I don't think that the database design is broken, since PostgreSQL
supports NUMERIC columns without a specific precision. So all I can
do is: create a VIEW, which rounds or casts my data on the fly to
a format, Access can access via the ODBC driver.


Some quick research suggests that Access's Decimal data type is what you should be using. It's not floating point. This fits with what you're saying, as the docs say Decimal in Access is limited to 28 digits.

Seems like it probably has a more limited implementation using fixed-point, not PostgreSQL's BCD representation, as they use a fixed 17 bytes in the native storage. 

It should map as SQL_DECIMAL, NOT double or float.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-odbc by date:

Previous
From: "Tobias Wendorff"
Date:
Subject: Re: NUMERIC type makes trouble in MS Access
Next
From: "Tobias Wendorff"
Date:
Subject: Re: NUMERIC type makes trouble in MS Access