Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server - Mailing list pgsql-hackers
From | Shachar Shemesh |
---|---|
Subject | Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server |
Date | |
Msg-id | 464FDFEC.4070602@shemesh.biz Whole thread Raw |
In response to | Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: Re: [Oledb-dev] double precision error with pg linux
server, but not with windows pg server
|
List | pgsql-hackers |
Tom Lane wrote: > Shachar Shemesh <shachar@shemesh.biz> writes: > >> Tom Lane wrote: >> >>> No, not unless you can make the case why this handles NaNs and >>> denormalized numbers compatibly across platforms... >>> >>> >> NaNs and infinite (plus and minus) should not be a problem. >> > > Really? Need I point out that these concepts, let alone their > representation, are not standardized in non-IEEE float implementations? > So what? They only need be standardtized in our export format, which we define. That's why we define it, after all.... > >> I'm not sure what denormalized numbers are. >> > > You should find out before proposing representation replacements for > floats. > Yes, but we're still discussing the preliminary stages. At these stages, it is enough to know that they CAN be defined (and they can). > >> What is the scenario in which you would want to tell them apart? >> Likewise, would you really want to tell +0 and -0 apart? >> > > IIRC (it's been fifteen or so years since I did any serious numerical > analysis) the arguments in favor have mostly to do with preserving > maximal accuracy for intermediate results in a series of calculations. > So maybe you could claim that these arguments are not so relevant to > storage in a database. But personally I don't think it's the province > of a database to decide that it need not accurately preserve the data > it's given to store. > This is not data given to store. It's data being exported. I think you are failing to consider something. The simple truth of the matter is that drivers are used far more often to access the server than pqlib or direct TCP programming. OLE DB has been stagnant for over two years now, is only available for one platform, and the easiest install option for it is through the postgresql installer, and yet it is still the third most popular download on pgfoundry (with the .NET provider being #1). What I'm getting at is that drivers are important. It is important that they have good performance. It is important that they be stable. I really think the backend should take driver considerations more seriously. The suggested method, of switching to text mode, will surely work, but it will also hurt performance. I've said it before. I find it highly unlikely that the ARM FP format will have any problem with being exported, even to a 64bit IEEE number. Not knowing the FP format, but knowing the platform, it likely just got rid of all the corner cases (NaN, denormalized numbers) merely so they can implement it more efficiently in hardware. I find the chances that it will have a wider range than IEEE in either mantissa or exponent unlikely. The question here is a broader question, though. Should we strive for binary compatibility across all platforms of a given version? The benefit is faster drivers and being able to COPY across platforms (but, still, not across versions). The cost are a couple of types (I would really change timestamp too, while at it) that need a non-straight forward export/import function. Tom seems to think this is not a goal (though, aside from his disbelief that such a goal is attainable, I have heard no arguments against it). What do the other people think? Shachar
pgsql-hackers by date: