RE: Float Precision with MS Access 97 - Mailing list pgsql-odbc

From Joseph
Subject RE: Float Precision with MS Access 97
Date
Msg-id AGECINCMMPHDKEJDKAIAGEGMCBAA.lters@mrtc.com
Whole thread Raw
In response to Re: Float Percision with MS Access 97  (Michael Calabrese <m2calabr@yahoo.com>)
List pgsql-odbc
Here is a quote from someone else's email

>>>
Are you using Row Versioning? This uses the xmin field so that it will be
necessary to relink the tables. MS Access can then use the primary key and
xmin to identify a row as exactly the same row it earlier retrieved. If you
don't do this access does uses all the fields (bar memo and BLOB's) in the
where condition of the update. This can lead to precision problems with
floats.
You will also need this in the back end to allow comparison of int4 to xid:
create function int4eq(xid,int4)
    returns bool
    as ''
    language 'internal';

create operator =

    leftarg=xid,
    rightarg=int4,
    procedure=int4eq,
    commutator='=',
    negator='<>',
    restrict=eqsel,
    join=eqjoinsel
);
<<<

This does fix the problem. The trouble is that access compares each field to
determine which record to update when really all it needs is the oid.

Relinking with row versioning fixed my problem. I don't know what to say if
you need creater precision... could you use numeric data type for really big
numbers?

respectfully,
Joseph
=============


-----Original Message-----
From: pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org]On Behalf Of Michael Calabrese
Sent: Monday, August 20, 2001 6:03 PM
To: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Float Percision with MS Access 97


I am sorry, but I guess I did not make my question
clear. I am not looking for greater backend precision
(ie moving to float8).  There seems to be a
mis-comunication between Access and postgres with
float4.
Access is seeing the number with fewer digits than
want must be in postgres.  If I do a :
UPDATE Parts SET Count = round(Count,4);
Then the access query from my first email will work.
This is a pain right now because my users will get a
write conflict error, call me, I will find the
offending field, do and Update with the round(x,4),
then it will work.

I could fix it by putting round(x,4) with all float
fields, but this seems like a poor fix.


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


pgsql-odbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: New CVS doesn't compile
Next
From: Hiroshi Inoue
Date:
Subject: Re: New CVS doesn't compile