Re: NUMERIC type makes trouble in MS Access

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Tobias Wendorff <tobias(dot)wendorff(at)tu-dortmund(dot)de>
Cc: Jan Wieck <jan(at)wi3ck(dot)info>, "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>, pgsql-odbc(at)lists(dot)postgresql(dot)org
Subject: Re: NUMERIC type makes trouble in MS Access
Date: 2018-05-28 01:34:09
Message-ID: CAMsr+YE1jrKGxu2BNGDxoQbFF39DM6TgU-p99NRM7pN2RBQyJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 28 May 2018 at 05:43, Tobias Wendorff <tobias(dot)wendorff(at)tu-dortmund(dot)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

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Tobias Wendorff 2018-05-28 02:13:06 Re: NUMERIC type makes trouble in MS Access
Previous Message Tobias Wendorff 2018-05-27 21:43:31 Re: NUMERIC type makes trouble in MS Access