bmizerany/pq — pull request #55 by deafbybeheading (2012-11-20 01:31:02+00:00)
Title: Set extra_float_digits to max for float fidelity

Without this setting, it's easy to lose fidelity when round-tripping some floating point values.

By the way, if you care more about server versions `8.4` and older than about `float4`, a value of 2 will suffice (2 was the max until `9.0`, but it is not enough for some `float4` values). Of course, the right thing to do is to check this based on server version, but that's uglier.

I haven't found a great Postgres discussion of this, but [this message](http://archives.postgresql.org/pgsql-bugs/2009-09/msg00171.php) prompted the bump from 2 to 3 and the JDBC driver [also sets extra_float_digits](https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/core/v3/ConnectionFactoryImpl.java#L636).