couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: Silent corruption of large numbers
Date Mon, 09 Nov 2009 09:46:40 GMT
On Sat, Nov 07, 2009 at 05:45:57PM -0800, Roger Binns wrote:
> As Adam pointed out, the problem is indeed Javascript.  Accessing the
> document directly does give the right answer.
> I don't know what the right solution to this is.

One option: store the values as strings. If there is an upper bound then you
can pad them out so they still sort properly. For example, your 64-bit
quantities could be stored as a string of 16 hex digits, left-padded with

Another option: use the Erlang view server, and get a big view-building
speed boost for free too. But in that case you must not expose your _design
docs or _temp_view to untrusted clients, since the Erlang view server is not
sandboxed and allows them to run arbitrary code.



View raw message